if sessionData[player.UserId].LastClaim < os.time() + 86400 then
warn("Already Claimed!")
return
end
sessionData[player.UserId].LastClaim = os.time()
Whats the Problem? I basically want it so you can claim if its your first time but if you’ve claimed before 24 hours then you shouldn’t be able to claim again
I may be wrong when im reading this but i think the error is where your using os.time() which is the current time then adding 86400 to it, try this instead
if sessionData[player.UserId].LastClaim + 86400 > os.time() then
warn("Already Claimed!")
return
end
sessionData[player.UserId].LastClaim = os.time()
Also you want sessionData[player.UserId].LastClaim + 86400 to be bigger if you want to warn that the player has already claimed.