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’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.
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:
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:
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.
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.