I’m creating a UI for a school, and on this UI I want to create a button that requests a developer. When the player clicks the button it displays a TextLabel on the screens of every player in the server. But It’s not working and it’s not giving an error.
I have the this code:
script.Parent.Parent.Parent.Tannoy.Visible = false
script.Parent.Parent.Parent.StaffMenu.Visible = true
for i,v in pairs(game.Players:GetPlayers()) do
v.PlayerGui.StaffMenu.TannoyMessage.Message.Text = (v.Name.." Needs a Developer/Server
Manager")
end
end)
This only changes the text on the players screen that sent it. I’ve attempted to google this issue and have had no luck, hopefully the brilliant minds of the Dev Forum will be able to help!
I could give just give you fixed code and be done with it, but the result would be that whatever project your working on becomes an incomprehensible mess.
When working with UI’s, as a general rule, any changes to a Players GUI’s should be made by the player themselves, the client, and not the server. To do this you need to use Remote Events and Remote functions, and to use them you need to understand what FilteringEnabled ‘Experimental Mode’ is and how it works. The wiki has plenty of articles on these, I recommend you give them a read and make some practice things with them.
For starters:
Then it’s probably a good idea to go through and understand as many as you can:
In my games, and I think in many other games, I have a RemoteEvent in replicated storage which can be fired by the server with a string as a parameter, that causes a local script on the client to create and display a message with that string. This is the kind of system you should be aiming to make in the end.