I try to make it work, but nothing work when i try other script! The problem is when i join the console start to spam ' Workspace.Parkour1.Finish.Script:3: attempt to index local 'plr' (a number value) ' can someone help me on this !
script.Parent.Touched:Connect(function() for plr in ipairs(game.Players:GetChildren()) do plr.Character.LowerTorso.CFrame = CFrame.new(workspace.Lobby.TeleportFinishedParkour) end end)
CFrame
. This will throw an error.local lobbyTP = game.Workspace.Lobby.TeleportFinishedParkour script.Parent.Touched:Connect(function(part) for _, plr in ipairs(game:GetService("Players"):GetPlayers()) do plr.Character:SetPrimaryPartCFrame(lobbyTP.CFrame) end end)
PrimaryPart
, to prevent any errors with R6. Also, I used GetPlayers
instead of GetChildren
as the latter will error if something other than a Player
object is in there.plr
is actually the index according to Vulkarin.