Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How Can You Choose Who is Teleported and Who Isn't? [Solved]

Asked by 9 years ago
target = CFrame.new(0, 50, 0) --could be near a brick or in a new area
for i, player in ipairs(game.Players:GetChildren()) do
   --Make sure the character exists and its torso exists
   if player.Character and player.Character:FindFirstChild("Torso") then
       --add an offset of 5 for each character
      player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
   end
end

This Script Will Teleport All The Players But How Could I Change It So That Lets Say I Didnt Want To Teleport BuilderMan and I Wanted Him To Stay In His Place how could i do it?

1 answer

Log in to vote
1
Answered by
Wizzy011 245 Moderation Voter
9 years ago

In your If statement (line 4), just add and player.Name ~= "Builderman" just before the then

0
Im new to scripting thanks for the help SamTheDeveloper 85 — 9y
0
No Problemo! Wizzy011 245 — 9y
Ad

Answer this question