Actually i have maid this script , but it only teleport one player …
local Players = Game:GetService("Players")
local Tppart = game.Workspace.TpFolder.TpPart1
for i,v in pairs(Players:GetChildren()) do
local char = v.Character
if char then
char.HumanoidRootPart.CFrame = Tppart.CFrame
end
So if someone can help me , that could be perfect !
This may seem like a really dumb question, but you tried with multiple player in the game right? And are there any errors in output?
I suggest you using
local function TeleportAll(Plyrs, TpPart)
for i, v in pairs(Plyrs) do
local Character = v.Character
if not Character then continue end
local HumanoidRootPart = v.Character:FindFirstChild("HumanoidRootPart")
if not HumanoidRootPart then continue end
HumanoidRootPart.CFrame = TpPart.CFrame
end
end
TeleportAll(game.Players:GetPlayers(), workspace.Baseplate)
Its not working , actually my script look like that :
Tp = function()
-- locals
for i,v in pairs(Players:GetChildren()) do
local char = v.CharacterAdded:Wait()
if char then
char.HumanoidRootPart.CFrame = Tppart.CFrame
end
-- script
end
end,