I got the error:
Workspace.ZiplineHolder.DatpartWhereUStickTo.Script:6: attempt to index local 'char' (a nil value)
What does this mean, and how do I fix it?
This is the script I used
game.Players.PlayerAdded:Connect(function(p) local char = workspace:FindFirstChild(p.Name) local part = script.Parent -- part local time = 2 -- amount of time local place = CFrame.new(part.Position) -- Where you want the player to go on touched repeat wait(1) time = time - 1 char.Torso.CFrame = place until time < 1 end)
game.Players.PlayerAdded:Connect(function(p) local char = game.Workspace:WaitForChild(p.Name) local part = script.Parent -- part local time = 2 -- amount of time local place = CFrame.new(part.Position) -- Where you want the player to go on touched repeat wait(1) time = time - 1 char.Torso.CFrame = place until time < 1 end)
If there still a problem let me know.
also if the player is using R15 this script will not work because "Torso" is now called UpperTorso!