|
| 06 Mar 2016 09:37 PM |
Why doesn't this work?
I have a thing that sets the async -- foostore:SetAsync(player.Name .. "_stuff", 1) --This works fine
And this script that doesn't work when players join
local foostore = game:GetService("DataStoreService"):GetDataStore("FooStore")
function PlayerAdded(player) if foostore:GetAsync(player.Name .. "_stuff", 1) then player:Kick() end end game.Players.PlayerAdded:connect(PlayerAdded) |
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 09:40 PM |
Try implementing some print statements to make sure it actually calls the event.
function PlayerAdded(player) print("Player has been added") if foostore:GetAsync(player.Name .. "_stuff", 1) then print("Async is equal to 1") player:Kick() end end game.Players.PlayerAdded:connect(PlayerAdded)
if print("Async is equal to 1") doesn't rpint then your if statement is not true.
|
|
|
| Report Abuse |
|
|
|
| 06 Mar 2016 09:42 PM |
| mmk well it doesn't get the async |
|
|
| Report Abuse |
|
|
| |
|