The word Character is not working on my local script Is it a outdated word?
Hello I was watching a tutorial on youtube here is the link.
https://www.youtube.com/watch?v=KV5AM-yYAlk
and he teaching and explaining I did exactally what he said and relized it didn't work...This video was made 1 year ago so I don't think it is outaded but here is the script he typed.
01 | local Camera = game.Workspace.CurrentCamera |
02 | local player = game.Players.LocalPlayer |
04 | player.CharacterAdded:wait() |
05 | player.CharacterAdded:WaitForChild( "HumanoidRootPart" ) |
07 | Camera.CameraSubject = player.Character.HumanoidRootPart |
08 | Camera.CameraType = Enum.CameraType.Attach |
09 | Camera.FieldOfView = 40 |
11 | game:GetService( "RunService" ).Stepped:Connect( function () |
12 | Camera.CFrame = player.Character.HumanoidRootPart.Position * Camera.new( 0 , 0 , 30 ) |
So basically this is a 2d camera setting script and I get these error
WaitForChild is not a valid member of RBXScriptSignal
PlayerScripts.CameraScript:6: attempt to index nil with 'HumanoidRootPart'
So what I understand from here is that the word Character does not work because all of this line have the word Character in it. How do I fix it? Or How do I make it simular to this if the code is outdated?