Script:
local count = 0 local player = script.Parent.Parent local character = player.Character local humanoid = character:WaitForChild("Humanoid") local beginTimer = false humanoid.Running:Connect(function(speed) if speed > 0 then count = 0 beginTimer = false print("Moving!") elseif speed == 0 then beginTimer = true print("Stopped!") end end) while true do wait(1) if beginTimer == true then count += 1 print("Count: ", count) if count == 10 then player:Kick("You were kicked for being idle 30+ minutes.") end end end
By the way I reduced the numbers for testing. I got the error: Players.RedstonePlayz09.PlayerScripts.IdleKickScript:4: attempt to index nil with 'WaitForChild' (This is a script inside a StarterPlayerScripts)