My gamemode voting system is experiencing difficulties

I am currently making a game where players can click what game mode they wanna do, right now, I’m working on the voting system for the game modes. Basically like what the title implies, I am experiencing difficulties.

I’m trying to use a script I saw on another devforum post (https://devforum.roblox.com/t/code-issues-voting-system/1001922/21?u=jovve] and implement it into my own, but nothing seems to be working, right now, the script is showing this:

https://gyazo.com/75be5ea7d517ab99a5f76bbe47fc15fb https://gyazo.com/1897b22b4928950285f0d38fa234b1a4

I’ve tried to replicate my own script watching TheDevKing video, I’ve tried to use numerous ideas I saw on other devforums post, I’ve tried to watch tutorials that deals with GUIs and Values more, but I either get confused and frustrated.

I am currently new to developing and I’m not so good in the scripting field, if you can give me advice, suggestions, a “push” on the back, please let me know.

Explorer Tab: https://gyazo.com/b53e873b40e3e7c1d2754989d45ab237
LocalScript (Inside StarterGui): https://gyazo.com/67a9078d5a2c0dbbb001e986c1e419ac
ServerScript (Inside ServerScriptStorage): https://gyazo.com/8efc38e96e591561bd21f0529bb2eff4

I just reviewed your code and there are a couple things you are not doing correctly.

Firstly, looking at this code in the local script:
image

It appears that your explorer does not have any text labels that are named after numbers, in your case, 1-6?

If you want all of the clients to keep track of how many votes each option has, I would add text labels with numerical names in perhaps a folder which can traverse through each children.

If you DON’T WANT the client to see how many votes each option has, you don’t really need it. The server holds all of the information and the client is only outputting that information on the screen in the form of text elements. You can simply remove the code I screenshotted above if this is the case.

Also, in your server script on this line:

image

Since there are 6 possible options in your case, you should probably add or statements for Value == 4, Value == 5, Value == 6 if you want the player to be able to toggle their votes.

1 Like

Where should I put the folder? I put it in songGui, but when I did, all of my text numbers went away and I couldn’t move or edit them no more. do I put a screengui in the folder too to help me edit them? Also, now it’s showing up this.

Actually I found the issue to that, my fault.

But now, it’s not showing anything in the Output and the votes aren’t updating at all.