Answered by
5 years ago Edited 5 years ago
If you're going to make a message that can be customized and fire anytime then i might have the answer.
Short answer: Data stores. Longer answer: Create a data store system with a string value that'll replicate onto other servers.
Example:
1 | local dss = game:GetService(DataStoreService) |
2 | local messageDS = dss:GetDataStore( "msg" ) |
5 | print (messageDS:GetAsync( "globalMessage" )) |
This is just the premise and you can of course remove the while loop and instead port this to a gui but this is just an example.
Now it'll print nil (since we haven't set the value yet) every 5 seconds. Setting it to a value is actually quite easy.
1 | local dss = game:GetService(DataStoreService) |
2 | local messageDS = dss:GetDataStore( "msg" ) |
3 | function newMessage(text) |
4 | messageDS:SetAsync( "globalMessage" ,text) |
There might be more efficient methods but this is just what i have.
And also make sure you've enabled API services in your game.