If I make a server script in ServerScriptService and change the text of a label on the playerGui to anything will it replicate on everyones client?
PlayerGui Is the property of an individual player, if you want to change it for everyone you’d want to loop through all players in Players and set the text of textlabel though a local script
You will need to loop trought every player in the game.
something like that:
local PlayerService = game:GetService("Players")
for index, player in pairs(PlayerService:GetPlayers()) do
local PlayerGui = player.PlayerGui
-- Do stuff
end
Doesn’t answer my question. I am saying if I make a server script and change something on playergui will it show for everyone. (without using loops)
No because if you get a determinate user from the Players category the change will affect only him.
The things that happen on the server for everyone are just the things like parts destroyed ecc.
Anyways if you want to make a gui change on the server to evitate exploiters is not very good, it’s just less “easy” to do and I would suggest to use server controls only on important gui buttons.
No. If you’re talking about Player.PlayerGui, it will only replicate to Player. This is due to the weird replication of PlayerGui, where only the server and player see it, and it will only replicate from server to client.
StarterGui is a different story, as it is replicated to to a Player’s PlayerGui on character spawns, and updates old ones if ScreenGui.ResetOnSpawn is true.