Type Index Pages
- BillboardGui
- CanvasGroup
- Frame
- Hint
- ImageButton
- ImageLabel
- PlayerGui
- ScreenGui
- ScrollingFrame
- StarterGui
- SurfaceGui
- TextBox
- TextButton
- TextLabel
- UIAspectRatioConstraint
- UIGradient
- UIGridLayout
- UIListLayout
- UIPadding
- UIPageLayout
- UIScale
- UISizeConstraint
- UITableLayout
- UITextSizeConstraint
- VideoFrame
- ViewportFrame
- ChangeHistoryService
- CoreGui
- DataModelSession
- DockWidgetPluginGui
- MultipleDocumentInterfaceInstance
- Plugin
- PluginAction
- PluginGui
- PluginGuiService
- PluginManager
- PluginMenu
- PluginMouse
- PluginToolbar
- PluginToolbarButton
- QWidgetPluginGui
- Selection
- StandalonePluginScripts
- StatsItem
- StudioService
- StudioTheme
No results found!
-
Instance
- GameSettings
- DebugSettings
- BodyMover
- WeldConstraint
- HttpRbxApiService
- NotificationService
- Translator
- Lighting
- Beam
- GuiService
- UserInputService
- Studio
- Plugin
- HttpService
- Mouse
- BindableEvent
- RunService
- Pages
- Humanoid
- TestService
- PathfindingService
- Chat
- NetworkPeer
- Feature
- CharacterAppearance
- Constraint
- NetworkReplicator
- JointInstance
- Light
- BasePlayerGui
- AnalyticsService
- NetworkMarker
- BinaryStringValue
- FlyweightService
- Geometry
- LoginService
- InstancePacketCache
- ThirdPartyUserService
- TouchInputService
- RuntimeScriptService
- GuidRegistryService
- PartOperationAsset
- DialogChoice
- PhysicsService
- AdService
- TextService
- MarketplaceService
- TeleportService
- Accoutrement
- GamePassService
- AssetService
- InsertService
- PointsService
- ChangeHistoryService
- ServerScriptService
- JointsService
- LogService
- InputObject
- Toolbar
- LuaSettings
- RenderSettings
- AnimationTrack
- PhysicsSettings
- NetworkSettings
- CFrameValue
- Animation
- Color3Value
- BoolValue
- BrickColorValue
- Vector3Value
- AnimationController
- BindableFunction
- Button
- Trail
- LocalizationTable
- LocalizationService
- DebuggerBreakpoint
- DebuggerWatch
- ScriptDebugger
- Animator
- Attachment
- RemoteFunction
- RemoteEvent
- PluginManager
- Camera
- Stats
- Sky
- StarterPlayer
- Dragger
- TerrainRegion
- Path
- TextFilterResult
- Dialog
- StatsItem
- GoogleAnalyticsConfiguration
- ScriptContext
- ControllerService
- CacheableContentProvider
- ReflectionMetadataClasses
- ReflectionMetadataEnums
- DebuggerManager
- GuiBase
- UIBase
- LuaSourceContainer
- GuiItem
- DataModelMesh
- ServiceProvider
- ReflectionMetadataItem
- PostEffect
- PhysicsPacketCache
- TouchTransmitter
- RobloxReplicatedStorage
- Visit
- LuaWebService
- ScriptService
- FlagStandService
- VirtualUser
- SpawnerService
- TimerService
- CookiesService
- Team
- GroupService
- StarterGear
- Message
- PlayerScripts
- Configuration
- ContentProvider
- CollectionService
- Debris
- ReplicatedFirst
- ServerStorage
- ReplicatedStorage
- Folder
- TweenService
- Players
- ContextActionService
- StarterPlayerScripts
- SoundService
- KeyframeSequenceProvider
- VRService
- PluginGuiService
- Player
- Teams
- Pose
- Keyframe
- KeyframeSequence
- IntConstrainedValue
- DoubleConstrainedValue
- ForceField
- RayValue
- Fire
- Smoke
- Sparkles
- ParticleEmitter
- IntValue
- StringValue
- NumberValue
- Explosion
- ObjectValue
- SoundGroup
- UserGameSettings
- ClickDetector
- Sound
- Selection
- BadgeService
- TaskScheduler
- GlobalDataStore
- DataStoreService
- CustomEvent
- CustomEventReceiver
- VirtualInputManager
- FunctionalTest
- TweenBase
- SoundEffect
- ReflectionMetadataEvents
- ClusterPacketCache
- PVInstance
- FaceInstance
- Controller
- ReflectionMetadataCallbacks
- ReflectionMetadataFunctions
- ReflectionMetadataYieldFunctions
- ReflectionMetadataProperties
- ReflectionMetadata
- AdvancedDragger
- HapticService
- FriendService
- GamepadService
No Result Found !!!
CameraType
The default Roblox camera scripts have several built in behaviors. Setting the CameraType of a player’s Camera will toggle between these behaviors. Note some CameraType’s require a valid Camera/CameraSubject to work correctly.
- Fixed:
Camerais stationary - Follow:
Cameramoves with theCamera/CameraSubjectand rotates to keep the subject in the center of view - Attach:
Cameramoves with theCamera/CameraSubjectat a fixed offset and will rotate as the subject rotates - Track:
Cameramoves with theCamera/CameraSubjectbut does not rotate automatically - Watch:
Camerais stationary but will rotate to keep theCamera/CameraSubjectin the center of view - Custom: Default
- Scriptable: No default behavior. Used by developers to script custom behavior
The above only applies when you use the default Roblox camera scripts. If you write your own camera scripts, you can choose to listen to CameraType and implement your own behaviors or ignore the property entirely.
Manually controlling the Camera
In some cases you may wish to manually control the Camera (for example during a cut-scene). The best way to do this is by setting the CameraType to ‘Scriptable’. The default camera scripts will not move or update the Camera on its own if CameraType is set to ’Scriptable’. This means you can freely modify the Camera using its properties and functions. For more information on positioning and orientating the Camera manually see the Camera/CFrame|Camera.CFrame page.
If you want complete control over the camera at all times, you may replace the default camera scripts with your own.
Code Samples
Basic Camera Cutscene
In this code sample a simple Camera animation is played after the Players/LocalPlayer spawns using TweenService. The Camera/CameraType of the Camera is set to ‘Scriptable’ so the default camera scripts do not interfere.
local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer
local camera = workspace.CurrentCamera
function playCutscene(character)
local primaryPart = character.PrimaryPart
camera.CameraType = Enum.CameraType.Scriptable
local baseCFrame = primaryPart.CFrame * CFrame.new(0, 0, -100) * CFrame.Angles(0, math.pi, 0)
local targetCFrame = primaryPart.CFrame * CFrame.new(0, 0, -10) * CFrame.Angles(0, math.pi, 0)
camera.CFrame = baseCFrame
local tween = TweenService:Create(
camera,
TweenInfo.new(2),
{CFrame = targetCFrame}
)
tween:Play()
tween.Completed:Wait()
camera.CameraType = Enum.CameraType.Custom
end
localPlayer.CharacterAdded:Connect(function(character)
wait(3)
playCutscene(game.Players.LocalPlayer.Character)
end)
How this site use cookies
This Platform uses cookies to offer you a better experience, to personalize content, to provide social media features and to analyse the traffic on our site. For further information, including information on how to prevent or manage the use of cookies on this Platform, please refer to our Privacy and Cookie Policy.