--// DECLARING VARIABLES \\--
local textBox = game.StarterGui.Events.Event
local textValue = game.StarterGui.Events.Value.Value
local toolGive = game:WaitForChild("ReplicatedStorage").Tool1:Clone()
local teamsService = game:GetService("Teams")
local playersService = game:GetService("Players")
--// STARTING \\--
playersService.PlayerAdded:Connect(function(player)
textBox.Text = textValue
while true do
textBox.Text = textValue
textValue = "Free Time"
wait(1)
textBox.Text = textValue
textValue = "Testing Time"
wait(1)
textBox.Text = textValue
textValue = "Riot Time"
if player.Team.Name == "Team 1" then
toolGive.Parent = player:WaitForChild("Backpack")
end
wait(1)
end
end)
I made this script and I had to access the LocalPlayer and this is not a localscript, so I decided to make the function game.Players.PlayerAdded:Connect(function(player) , but after I did that nothing was working.

2 comments
Is it because I'm using a loop inside a function?
You're using StarterGui instead of PlayerGui. Modifying StarterGui will only change the gui for players who come after you change it.