Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can i make a script in ServerScriptService change Label.Text for all players?

Asked by 5 years ago
Edited 5 years ago

I just need the Labe to have a countdown and say who won the game basically. Ive tried a few ways but they dont seem to work :(

I've tried:

•Directly changing the Label.text •Changing a StringValue in Workspace and writing a localscript in the label to change it (this works in studio but not in game) •Changing a StringValue in the label from the Workspace script and writing a localscript in the label to change it (this works in studio but not in game) •Changing a StringValue in Workspace and writing a script in the label to change it (this works in studio but not in game) •Changing a StringValue in the label from the Workspace script and writing a script in the label to change it (this works in studio but not in game)

idk what to do now, any help would be appreciated, im fairly new.

1 answer

Log in to vote
0
Answered by 5 years ago

Hello, my guess is that you are using FE on and with FE on local scripts can only access the local player, regular scripts can only access the server; to fix this you have to use remote events and functions. Here is the documentation about it.

So what you would need is to send a parameter like the countdown number through the remote event with FireAllClients() and a local script will be listening on the remote event or function to see if it fires. You could also only fire the remote event or function and the local script doesn't need a parameter, it would just be a signal to start the countdown.

0
Thanks, ill look into it and give it a try now :) wireland04 0 — 5y
Ad

Answer this question