Strange behaviour when changing int values

Hey! When I’ve tried to change an int value from a script, it worked. But a few minutes later, it didn’t work anymore. Right after I’ve inserted 2 scripts with a remote event. I’ve tried removing both the scripts and remote event but it didn’t work.

What’s even stranger is that the output states the value is one although when I see it, it’s 0.

This might be a glitch with Roblox Studios viewing end but I’m honestly not sure.


local plr = game.Players.LocalPlayer
local playerhasclicked ="BoolValue")
playerhasclicked.Parent = game.ReplicatedStorage
playerhasclicked.Value = false
	if playerhasclicked.Value == false then
		script.Parent.Parent.TextLabel1.Votes.Value += 1
		print("up ".. script.Parent.Parent.TextLabel1.Votes.Value.. " is that value when up.")
		playerhasclicked.Value = true
	elseif playerhasclicked.Value == true then
			warn("You have already voted!")		



Guys here’s an update, this is a glitch with the explorer:


even when I go into server.

Still, this is honestly strange.

When changing the values of ValueBase instances on the client those changes will not replicate to the server, as such even though from the client’s perspective a ValueBase’s value may be “1” this change only replicated for that particular client, from the server’s perspective the ValueBase’s value is still “0” or whatever its last value set by the server. If you want changes to the values of ValueBase instances to replicate (to the client & to the server) then you need to perform those changes on the server.

1 Like