I'm trying to make that the players will teleport when ChosenGamemode's text is "Free For All Was Chosen" or "Death Match Was Chosen" but it doesn't teleport any player and it doesn't change the text back to "Gamemode Was Chosen" and it doesn't disappear, It's because it doesn't make it through the player teleportation.
[Edit: I have no errors in output]
Script:
for i, players in pairs(game.Players:GetChildren()) do
local PlrGui = players.PlayerGui
local RoundSystem = PlrGui.RoundSystem
local Frame = RoundSystem.ChosenGamemode
local ChosenGamemode = Frame.ChosenGamemode
local Target = CFrame.new(0, 50, 0)
while Frame.Visible == true do
wait(0.1)
if ChosenGamemode.Text == "Free For All Was Chosen" then
wait(4)
-- Teleport Players
players.Character.HumanoidRootPart.CFrame = Target + Vector3.new(0, i * 5, 0)
ChosenGamemode.Text = "Gamemode Was Chosen"
Frame.Visible = false
end
if ChosenGamemode.Text == "Death Match Was Chosen" then
wait(4)
-- Teleport Players
players.Character.HumanoidRootPart.CFrame = Target + Vector3.new(0, i * 5, 0)
ChosenGamemode.Text = "Gamemode Was Chosen"
Frame.Visible = false
end
end
end
(This script is a local script and the script is kinda glitched because it's long)
I would really appreciate it if you help me, Plus I'll accept your answer and we both make reputation from that.
Thanks, MajinBluee

2 comments
Why in a LocalScript? Use a ServerScript instead...
Sorry, But this didn't help me. But thanks for being kind and helping me with my problem!