local telestart = script.Parent local teleend = game.Workspace.TeleEnd function teleportPlayer(part) local torso = part.Parent:FindFirstChild("Torso") torso.CFrame = CFrame.new(teleend.Position) + Vector3.new(0,10,0) print(1) --For testing end telestart.Touched:connect(teleportPlayer)
18:30:28.647 - Workspace.TeleStart.Script:6: attempt to index local 'torso' (a nil value)
I'm using my body parts to help make the parameter function( eg. Left Leg). Although I have found the solution to this script, and that is that I made the torso in line 6 position itself into my body parts. I want to know why it caused the error above?