I am learning to make Camera manipulation, i got this script from a you tuber, his video was made in jul/11/2017, i am not sure if its outdated because roblox studio, has been doing alot of updates. to get to the point why is this script not working it suppose to get the players camera but its not doing it.
local Player = game.Player.LocalPlayer local Character = Player.Character or Player.CharcterAdded:wait() local Camera = workspace.CurrentCamera repeat wait() Camera.CameraType = Enum.CameraType.Scriptable until Camera.CameraType == Enum.CameraType.Scriptable Camera.CFrame = workspace.CameraPart.CFrame
I'm assuming this script was made before the update on StarterPlayer. Because of this update, you have to make a script called "CameraScript" under StarterPlayerScripts, so your script, which is outdated and very sloppy
local Player = game.Player.LocalPlayer --typo at "Player" (needs to be Players) local Character = Player.Character or Player.CharcterAdded:wait() --typo at "CharcterAdded" (CharacterAdded); :wait() is now deprecated in favor of :Wait() local Camera = workspace.CurrentCamera repeat wait() Camera.CameraType = Enum.CameraType.Scriptable until Camera.CameraType == Enum.CameraType.Scriptable --fail Camera.CFrame = workspace.CameraPart.CFrame
becomes the neater result intended by Roblox below.
--CameraScript (LocalScript) in game.StarterPlayer.StarterPlayerScripts local Player = script.Parent.Parent --script.Parent = PlayerScripts; PlayerScripts.Parent = Player repeat wait() until Player.Character local Character = Player.Character local Camera = game.Workspace.CurrentCamera Camera.CameraType = Enum.CameraType.Scriptable Camera.CFrame = game.Workspace.CameraPart.CFrame