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 concatenate nil with string - line 7
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
local BanData = game:GetService("DataStoreService"):GetDataStore("Bans")
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.week..Date.day..Date.hour then -- problem here
player:Kick("YOU HAVE BEEN BANNED: REASON: ["..BanData:GetAsync(player.UserId).Reason.."] LENGTH TIME: ["..Length.."]")
week is not a key in