i been trying to find out how to teleport random people to a part but can't figure out how it works. ik it has something to do with (MoveTo) or something like that but im not for sure
Put this in server script service
local plrs = workspace:GetChildren() local part = workspace:WaitForChild("part") workspace.ChildrenAdded:connect(function(instance) -- gets a new player if he joins plrs = workspace:GetChildren() end) wait(60) --teleports after 60 seconds for i = 1, #workspace do if plrs[i]:FindFirstChild("Humanoid") then --finds the humanoid local torso = plrs[i]:FindFirstChild("HumanoidRootPart") --finds the torso torso.CFrame = part.CFrame --teleports end end
I can't make a script right now as I'm on holiday (no computer) but I can tell you how. You would need to pick a random from Workspace, make sure it has humanoid. If humanoid is true, teleportFunction(player). Before this, define the players character as player variable.You need to create a new function that will teleport the Torso (or upper/lower torso depending on r15) to the part. Using CFrame, define the part with local (local part = script.Parent.......) and p1.UpperTorso.CFrame = part.CFrame."