Been trying to get this teleportation script to work for a while now. I put it behind to finish my other scripts for a game. Now that I’m getting back to it, I don’t understand why the script isn’t teleporting the players in the team.
Here is my script:
local teleportationTarget = CFrame.new(-170.3, 6.2, 207.8);
if game.Teams:FindFirstChild("Spectators") and #teams.Spectators:GetPlayers() > 0 then
print("DID IT WORK?");
for i, players in ipairs(game.Teams.Spectators:GetChildren()) do
if players.Character and players.Character:FindFirstChild("HumanoidRootPart") then -- Make sure the player's character and HumanoidRootParts exist
players.Character.HumanoidRootPart.CFrame = teleportationTarget + Vector3.new(0, 5, 0);
wait(1);
end
end
print("NOPE?");
end
It goes through those lines of code just fine. “DID IT WORK?” and “NOPE?” printed out just fine.