Hello, I am trying to make the specific player teleport who has the Value to true. It currently teleports everyone. Btw it is in a normal script.
local roundLength = 5
local IntermissionLength = 20
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local LobbySpawn = game.Workspace.LobbySpawn
local GameAreaSpawn = game.Workspace.GameAreaSpawn
local ReplicatedStorage = game:GetService("ReplicatedStorage")
InRound.Changed:Connect(function()
if InRound.Value == true then
for i, player in pairs(game.Players:GetChildren()) do
local char = player.Character
if player.JoinRound.Value == true then
char.HumanoidRootPart.CFrame = GameAreaSpawn.CFrame
end
end
else
for i, player in pairs(game.Players:GetChildren()) do
local char = player.Character
if player.JoinRound.Value == true then
char.HumanoidRootPart.CFrame = LobbySpawn.CFrame
player.PlayerGui.JoinRound.TextButton.Text = "Join"
player.JoinRound.Value = false
end
end
end
end)
