I don't know what I'm doing wrong but I can't figure out how to kick someone out during a time limit. (like waiting 10 minutes or something)
if game.Players:FindFirstChild(hit.Parent.Name) ~= nil then wait(20) workspace.HOw:Play() --badge code wait(18.99099999999999) me = game.Players:FindFirstChild(hit.Parent.Name) me:Kick("Congrats, now leave!") script.Parent.Parent.Parent.Enabled = false end
Also please answer if you want: Does this work with rewarding players badges too?
Roblox has a Player.Idled event that fires when the player is AFK for 2 minutes, if that helps you. For more info, check out this article.