I am trying to get my spawn in my game working but as soon as I click the button to get teleported and the countdown reaches 0 I get this error and don't get teleported to this new location in the map.
repeat wait() until Player.Character:FindFirstChild("Torso")
Player.Character.Torso.Anchored = true
Player.Character.Torso.CFrame = CFrame.new(Vector3.new(-21.3, 15019, -44.1));--teleobject.CFrame
local bodyVel = Player.Character.Torso:FindFirstChild("BodyAnchor")
bodyVel.maxForce = Vector3.new(5000000,5000000,5000000)
bodyVel.D = 1000
bodyVel.P = 10000
bodyVel.position = Workspace.Scenery:WaitForChild("ReturnPad").Position
Player.Character.Torso.Anchored = false
Player.Character.Torso.CFrame = CFrame.new(math.random(Workspace.Scenery.ReturnPad.Position.X-10,Workspace.Scenery.ReturnPad.Position.X+10),Workspace.Scenery.ReturnPad.Position.Y,math.random(Workspace.Scenery.ReturnPad.Position.Z-10,Workspace.Scenery.ReturnPad.Position.Z+10))
for i = 0, 1, 0.05 do wait()

3 comments
It means that BodyAnchor was not found and that :FindFirstChild returned nil.
Also please for the love of god use MaxForce and Position. maxForce and position are deprecated.
Its my first few scripts that i am writing out. Where do I find the correct BodyAnchor so I can fix this error than?