-
What do you want to achieve? Keep it simple and clear!
Get rid of errors. -
What is the issue? Include screenshots / videos if possible!
attempt to compare string <= number - line 7 -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
nothing.
NOTE: My DataStore table are number but why it’s issue?
local BanData = game:GetService("DataStoreService"):GetDataStore("Bans")
game.Players.PlayerAdded:Connect(function(player)
if BanData:GetAsync(player.UserId) then
local Length = BanData:GetAsync(player.UserId).Length
local Date = os.date("*t")
if Length >= Date.year..Date.month..Date.day..Date.hour then -- problem here
BanData:RemoveAsync(player.UserId)
end
player:Kick("YOU HAVE BEEN BANNED: REASON: ["..BanData:GetAsync(player.UserId).Reason.."] LENGTH TIME: ["..Length.."]")
end
end)