Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Voting count gui script and displa yisnt working?

When a player presses a button an event will fire, then a script will read when that event fires and change a value (the vote count), then send an event back to a local script to change the display count on a text label. My count value is called value so that is why I use Value.Value (ik it's weird)

Local Script

Value = script.Parent.Value

script.Parent.Text = Value.Value

game.ReplicatedStorage.Vote1.OnClientEvent:Connect(function()
    script.Parent.Text = Value.Value
end)



Server Script

game.ReplicatedStorage.Vote.OnServerEvent:Connect(function()
    game.StarterGui.ScreenGui.Votes.Value.Value = game.StarterGui.ScreenGui.Votes.Value.Value + 1
    game.ReplicatedStorage.Vote1:FireClient()
end)

1 comment

0

Could you add the structure of the gui in the information?

1 answer

✓ Accepted answer

Well there's not much of an information that was regarding this so my thoughts are that the problem is you're calling a value twice like in your LocalScript:

Value = script.Parent.Value

script.Parent.Text = Value.Value

game.ReplicatedStorage.Vote1.OnClientEvent:Connect(function()
    script.Parent.Text = Value.Value
end)

You call Value at line 3 & 6 twice like Value.Value

I don't know if you have that as a value and you're calling it's value but based on the info i got i think that's the problem so remove one of the .Value's and should work?

If it worked accept,upvote if it didn't just comment what happened and i'll fix it.

1 comment

0

Imo the main problem is that he's changing the StarterGui -.-

This discussion is preserved as it was. New answers, comments, and votes are closed.