This is obvious, that you haven’t changed the correct visible label. The StarterGui is not what is displayed, but replicated to the player’s GUI. You need to fire a signal to all players and let their LocalScript handle the change.
The GUI from StarterGui clones to PlayerGui when the player joins so in this case you should be updating PlayerGui which only can be done from the client.
Hello there! If you want to temporarily display a text label on the screen, you’ll have to use a RemoteEvent. Whenever someone left, you must call the RemoteEvent via a server script.
Create a script in ServerScriptService:
This script will call the RemoveEvent whenver a player left the game.
game.Players.PlayerRemoving:Connect(function(Player) --When someone left the game...
game.ReplicatedStorage.RemoteEvent:FireAllClients(Player.Name) --... call the RemoteEvent
end)
Then, create a local script into StarterGui:
game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function(Player) -- When the RemoteEvent is being called...
script.Parent.PlayerLeft.LeftText.Text = Player .."left the game" --Change the text.
-- Change this to wherever your TextLabel is.
end)
I hope this helped you, feel free to reply to this post of you has any questions!
Alright. To fix the issue, please move ChangeGui into LeftText and edit the local script to:
game.ReplicatedStorage.LeftEvent.OnClientEvent:Connect(function(Player) -- When the RemoteEvent is being called...
script.Parent.Text = Player .." left the game"
end)