Hi, I’m scripting my own football game with a scoreboard gui. But when someone scores, I want to update the gui for everyone. I’ve tried to use remote events. Where I do FireAllClients. How to update it for everyone?
Thanks
Hi, I’m scripting my own football game with a scoreboard gui. But when someone scores, I want to update the gui for everyone. I’ve tried to use remote events. Where I do FireAllClients. How to update it for everyone?
Thanks
Make a IntValue and when its changed(:GetPropertyChangedSignal(“Value”)) then you update it ? or just do choose
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ScoreUpdateRemoteEvent = ReplicatedStorage:WaitForChild("ScoreUpdateRemoteEvent")
function onScoreUpdate(newScore)
scoreLabel.Text = tostring(newScore)
end
ScoreUpdateRemoteEvent.OnClientEvent:Connect(onScoreUpdate)
If you need a Gui to update for all players, you will need to do the following.
Make a script that fires on a remote event and updates the gui server side.
Make a local script that fires the remote event when a player scores.
You can then use the local script to fire the remote event when a player scores, and all players will see it update.