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

How do i make an IntValue Object readable and editable by all the clients in the game?

Asked by
sheepposu 561 Moderation Voter
5 years ago

I have an IntValue object named Que that I want reachable and editable by all clients. If someone joins, it only updates their Que value and the other players don’t see it. The Que is to start the game and if it stays at one, the game won’t start. BTW it's in ReplicatedStorage right now.

0
You’d need to use RemoteEvents. For your case though, why don’t just get the amount of players when a player joins through  the PlayerAdded event? If it is more than one then you can fire a BindableEvent (or other methods) to start. If the players start the game manually then you just have to check the number of players in the server through #game:GetService(“Players”):GetPlayers(). Rheines 661 — 5y
0
The Que is how many players have readied up sheepposu 561 — 5y
0
Are ready to play sheepposu 561 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

I'm still trying to figure this stuff out myself, but I think what you might want is a localscript in player's startingscripts that will have a FireServer event and a script somewhere on the server that has a OnServerEvent that actually updates your value. That way, when a player joins it will send the message to the server to update the value.

Ad

Answer this question