Will that work on every client in the game?
Yes I know it will work, but will all clients see the same text at the same time?
If youâre displaying text from the client then no, unless all players were present at the time FireAllClients() was called all of them will see different text, to get over this try to keep the time synced on the server and as players join, show them the current numbers thnat need to be shown.
I also need to do this for my game also, so do you just change the text in the StarterGui or something?
How would you do that? Iâm new to scripting.
also when the text changes, do I have to fire and receive the remote event again?
Also, Isnât it easier to put the text in a server script so you dont have to fire and receive a remote event?
Instead of updating the clientâs GUI, have it listen to a NumberValue representing the intermission.
Server:
local Intermission = NumberValue
for i = 30,1,-1 do
Intermission.Value = Intermission.Value - 1
end
Client:
local Intermission = NumberValue
Intermission:GetPropertyChangedSignal("Value"):Connect(function()
script.Parent.Text = "Welcome! A new map will be chosen in"..Intermission.Value
end)
Look at the post above, I already have the script functioning, but will it show the same text to all clients at the same time is the question
Since a remote is fired once, no. Thatâs why I suggest that you listen for a property changed in a NumberValue or IntValue.
So if its a numberValue or an IntValue it will show to all clients, the same text, at the same time?
Yes, have the NumberValue/IntValue be looped in the server. Let the client listen for a change.
Can I put the NumberValue where ever i want, or does it have to be in a specific place?
It must be where the server and client can see. Aka, do not put it in ServerStorage
or ServerScriptService
.
Can I put it in workspace? (30chars)
Yes, as I said, just donât put it in ServerStorage
or ServerScriptService
.
I dont know why, but the code you made isnât working. I put script in serverscriptservice and local script in text label
Maybe you have two remote events named RemoteEvent in the RemoteEvents folder and the local script is listening to one of them while the server script is firing another. If thatâs true you have to give them different names so they donât get mixed up.
Have you tried printing something before the function in the local script to see if it never runs?
Would this work?
'''
â Server
local intermission = game.Workspace.NumberValue
for i = 30,1,-1 do
wait(1)
end
'''
I do have more than one remote event, but only one is called âRemoteEventâ