Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

For a questionnaire/poll, do I use Data Stores, or something else?

Asked by 6 years ago

I'll cut to the chase: I'm trying to make a questionnaire/polling system for my place. Trouble is, I don't know where to start.

I want to make it so that results are publicly available, but only in numbers (in other words, I don't want everyone to know who voted for what). I also want those numbers to be available at any time, so if the game closes the stats are still available the next time it reopens. Are Data Stores a way to do this, and if so, what's the logic behind it?

I know the basics of GUI design/scripting, so that's not an issue. If someone could point me in the right direction, it would be much appreciated!

0
Yeah, use DataStores. There are many articles in the wiki explaining how that services works. Le_Teapots 913 — 6y

1 answer

Log in to vote
2
Answered by
Avigant 2374 Moderation Voter Community Moderator
6 years ago
Edited 6 years ago

I'd greatly advise using HttpService for this, DataStoreService is only really meant (and good for) the saving of player data. I'd recommend against using DataStores here. You could even make the results publicly visible on a webpage so people wouldn't need to join the game to see who voted for what.

When someone voted, you'd send an HTTP POST request with HttpService:PostAsync() request to your web server, and add a vote if applicable. You'd store a secret key on both your web server and your game so that only requests coming from your game were authorized by checking if the keys matched (for example, a normal user wouldn't be able to just send the HTTP POST request to your website and have it counted as a vote).

Ad

Answer this question