I'm really confused and I am very clueless as to how to do it.
So what I want is to be able to change a text using a server script, with the script being in ServerScriptService.
ServerScriptService does not change anything, it just makes it inaccessible from local scripts for secure storage.
(change ROBLOX to the player)
game.Players.ROBLOX.PlayerGui.ScreenGui.TextLabel.Text = "Hello"
Or use:
game.Players["ROBLOX"].PlayerGui.ScreenGui.TextLabel.Text = "Hello"
Or:
game.Players:FindFirstChild("ROBLOX").PlayerGui.ScreenGui.TextLabel.Text = "Hello"
To loop through all players, use this:
for _,v in pairs(game.Players:GetChildren()) do v.PlayerGui.ScreenGui.TextLabel.Text = "Hello" end
(asked in comment)
Thanks for reading, hope it helped!
This Is Better To Do:
Game.Startergui.(ScreenGuiName).(Frame Name).(TextName).Text = "Text" wait (4) repeat