Heya. I'm trying to get the game to check if the player has visited before, and if not, then set the Async to "1" and continue incrementing for that player each time he/she joins. I read up on the forum, and I unfortunately need to check the key before I set it. Thanks!
local hasJoined = ds:GetAsync(newplayer.Name.."_JOIN")
if hasJoined == nil then
isprevioususer = 0
ds:SetAsync(newplayer.Name.."_JOIN", 1)
elseif hasJoined >= 1 then
isprevioususer = hasJoined
ds:IncrementAsync(newplayer.Name.."_JOIN", 1)
end

8 comments
Yes, but it throws an ERROR. It doesn't actually return anything at all, the script doesn't get that far.
Server test in in studio. Add prints to the script to see what the value is then press F7 in studio.
Yeah, if I put anything after the 1st line, it won't run because it's throwing an error and the script is automatically shut down.
What's the error?
I get " 20:06:44.010 - Request rejected" and "20:06:44.012 - Player1_JOIN" in the output box.
Try putting this in the output before you start the server. game:SetPlaceId(idofplace,false)
Okay.
Same thing.