Hi i've been making a captcha system for my roblox game and i wanted to make it so that if you don't complete the captcha in 30 seconds you get auto kicked i've tried this and it didn't work
game.Players.PlayerAdded:Connect(function(player) wait(30) player:Kick() end)
help would be appreciated!
Assuming you've already made your captcha system, it should go a little like this:
local Player = game:GetService("Players").LocalPlayer local timeAtJoin = os.time() local captchaDone = false while true do if captchaDone then break elseif (os.time() - timeAtJoin) >= 30 then Player:Kick("Didn't complete captcha in time.") break end end
What you need to do:
captchaDone
to true when you've done it.That's it.