Hey there, new scripter here
I was wondering how i would go about Force Teleporting players to a certain Part?
Thanks!,
1 | local part = workspace.Part -- Change this |
2 |
3 | for i,v in next , game.Players:GetPlayers() do -- loop through the players |
4 | local chr = v.Character |
5 | if chr and chr:FindFirstChild( "HumanoidRootPart" ) then -- check if they have a character and humanoidrootpart |
6 | chr:SetPrimaryPartCFrame(part.CFrame) -- set their cframe to the part's cframe. |
7 | end |
8 | end |
1 | local PartToTeleportTo = game.Workspace:FindFirstChild( "" ) --// Fill this in with the part name. |
2 |
3 | for i,v in pairs (game.Players:GetPlayers()) do |
4 | v.Character.HumanoidRootPart.CFrame = PartToTeleportTo.CFrame |
5 | end |