Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make a timer that kicks or shutdowns the game?

Asked by 5 years ago

I've been trying to find how to do it but there's no tutorials on this. I'm trying to make it so when the player joins and after 7 seconds gets kicked

2 answers

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

This is really simple, you should've done some more research before asking... anyways I will still help you.

game.Players.PlayerAdded:Connect(function(player)
wait(7)
player:Kick()
end)

Make sure you put that into a local script in replicated first.

0
i put it in replicated first but it didn't work, so i just put it in a script in workspace and it worked. Thanks Bord_erlands 2 — 5y
0
you were suppose to put it into a local script.. Just2Terrify 566 — 5y
0
Why would you put it in a LocalScript? And in ReplicatedFirst? The :Kick() function wouldn't work. Unhumanly 152 — 5y
0
Even if you put it in StarterGui, it wouldn't kick your own player, because the player joins the game before this script is loaded, meaning the event listener won't run. Unhumanly 152 — 5y
Ad
Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

I would recommend learning how servers work and go to the ROBLOX Developer Site to learn more about scripting. It's helped me a bit and I think it'll help you on your quest. You also didn't provide some type of coding attempt so the likely of people answering this is slim. Apologies that I can't help much more than with this.

Answer this question