Basically the platinum time datastore is not a boolean value and I have no idea why it says “attempt to compare number and boolean” when i play the game, the only boolvalue there is, is the parent of the platinum time value:
Platinum, BooleanValue (I use this because it’s more simple for me to make perks if this is true)
PlatinumTime, IntValue (Membership duration before it expires and sets the Platinum boolvalue to false)
As I said, the “PlatinumTimeDatastore” is the IntValue
For the rest I don’t even know what to say because I’m confused and lost about 300 braincells this hour.
I think it means os.time is a number and your GetAsync is a boolean, you are basically checking if a number is less than or equal to a boolean, which is impossible.
local PlatinumTime
local Success,Error = pcall(function()
PlatinumTime = game:GetService("DataStoreService"):GetDataStore("PlatinumTimeDatastore2_"):GetAsync(Player.UserId)
end)
Now the variable PlatinumTime is an integer, and you can compare it to os.time() after making sure it’s not nil (which happens in case of an Error in GetAsync):
if PlatinumTime then
if os.time() <= PlatinumTime then
--treatments
end
end
Ok so I read that tutorial and I think it saves the duration/time of the membership or something, seems like a number. In your script, what exactly are you saving?
Use sleitnick’s DataStore Editor plugin to see what was being saved to that specific key. It will tell you the data type that was saved. Let us know what the saved data is.