generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Only play the game once?

Previous Thread :: Next Thread 
REM25 is online. REM25
Joined: 28 Feb 2010
Total Posts: 3154
21 Nov 2013 06:00 PM
What is the script so that people can only play my game once? I'm trying to create a 5 minute demo for my game...
Report Abuse
RoyStanford is not online. RoyStanford
Joined: 21 Oct 2008
Total Posts: 2222
21 Nov 2013 06:04 PM
Make a data persistence bool value, use it to check if the player has played before, if not just wait five minutes and set it to true. If they have played just kick them.
Report Abuse
REM25 is online. REM25
Joined: 28 Feb 2010
Total Posts: 3154
21 Nov 2013 06:06 PM
Whoa whoa whoa....can I have an example of that line for the data persistence?
Report Abuse
REM25 is online. REM25
Joined: 28 Feb 2010
Total Posts: 3154
21 Nov 2013 06:15 PM
Anyone?
Report Abuse
flatline115 is not online. flatline115
Joined: 29 Jul 2013
Total Posts: 7826
21 Nov 2013 06:16 PM
"example"

game.Players.PlayerAdded:connect(function(player)
bool = Instance.new("BoolValue", player)
bool.Name = "ckd"
bool.Value = player:LoadBoolean("enter")
bool.Changed:connect(function(p)
if p == bool.Value then
player:SaveBoolean("enter", p)
end
end)
end)
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
21 Nov 2013 06:17 PM
Game['Players']['PlayerAdded']:connect(function(p)
p:WaitForDataReady();
if p:LoadBoolean("Demo") then
p:Kick()
else
p:SaveBoolean("Demo", not false);
end
end)
Report Abuse
Absurdism is not online. Absurdism
Joined: 18 Jul 2013
Total Posts: 2568
21 Nov 2013 06:18 PM
mnn why do you do ['this'] :((((((((((9999999999999999999999999999nine
Report Abuse
Jetta765214 is not online. Jetta765214
Joined: 22 Oct 2008
Total Posts: 1855
21 Nov 2013 06:18 PM
More info:

http://wiki.roblox.com/index.php/Data_persistence_tutorial
Report Abuse
REM25 is online. REM25
Joined: 28 Feb 2010
Total Posts: 3154
21 Nov 2013 06:18 PM
ok thanks
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image