ReplicatedStorage IntValue not the same across clients

How do I make an IntValue Replicate across all clients? I am trying to show the number of votes people have made on all clients but right now it’s only showing on the client who voted. You can see in this screenshot the same IntValue’s Value is different on seperate clients:

The IntValue is updated from the client when they click a gui button with this LocalScript:

LocalScript
local rep = game.ReplicatedStorage
local mode = rep.Remotes.Voting.Rounds

function one()
	mode.Three.Value = mode.Three.Value + 1
	script.Parent.Three.Text = "You selected 3 rounds. Current Votes: "..mode.Three.Value
	script.Parent.Five.Text = "Current Votes: "..mode.Five.Value
	script.Disabled = true
	script.Parent.Waiting.Visible = true
end

script.Parent.Three.MouseButton1Click:Connect(one)
1 Like

I think more context should be added, for example, what is the value on the server, and how you update the intValue. (EDIT: The scripts used to keep track of the votes)

You should change the Value from the server, as that will force the IntValue to replicate to all clients.

Do I have to do that with RemoteEvents or can I take GUI input through a server script?

I think a RemoteEvent should work, using the :FireServer function (more info in Developer hub).

1 Like

You’d do it with a RemoteEvent. Just be sure to run server-side checks on any updates sent from a client to make sure people cannot abuse them.

Don’t worry i know how they work lol my entire script is based on them :wink: