Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i kick a player out for waiting too long?

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?

3 comments

0

yeah the question is stupid. I'm just kicking players out when they wait for like 10 hours. (for a badge)

0

what is the error?

0

Line 1, that's my error

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.