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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 2568 |
|
|
| 21 Nov 2013 06:18 PM |
| mnn why do you do ['this'] :((((((((((9999999999999999999999999999nine |
|
|
| Report Abuse |
|
|
|
| 21 Nov 2013 06:18 PM |
More info:
http://wiki.roblox.com/index.php/Data_persistence_tutorial |
|
|
| Report Abuse |
|
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
| |
|