when I run this script:
SERVER SCRIPT
01 | wait() |
02 | text = script.Parent.text |
03 | if script.Parent.PlayerCount.NumOfPlayers.Value = = 1 |
04 | then |
05 | text.Value = "Welcome to SURVIVAL GAMES!" |
06 | game.ReplicatedStorage.Remotes.ann:FireServer() |
07 | wait( 10 ) |
08 | text.Value = "If you don't know how to play, read the description!" |
09 | game.ReplicatedStorage.Remotes.ann:FireServer() |
10 | wait( 10 ) |
11 | end |
it is supposed to run this one
LOCAL SCRIPT
1 | wait() |
2 | local text = game:GetService( "ServerScriptService" ).text.Value |
3 | game.ReplicatedStorage.Remotes.ann.OnServerEvent:Connect( function (qnay) |
4 | script.Parent.Visible = true |
5 | script.Parent.TextButton.Text = text |
6 | end ) |
however, it gets stuck on 'WELCOME TO SURVIVAL GAMES' and doesnt go on to the next value any ideas why
I believe this is a situation where you aren't updating the client and server.
I'm assuming that since you are using the :FireServer() Method that the top script is a local script. Now before I clarify the issue, have you -
Also I'm assuming that the bottom part of the script is a server script.
If so the issue is that while you updated the value, "text.Value", on the client. You did not update it on the server, which does not know that that value has been updated.
If you want to make the text change, you should change the text on the server side, the bottom script.