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

How to make a coutdown when countdown finish player get kicked?

Asked by 3 years ago
Edited 3 years ago

You know what means from the title

anyway here the code

when the count down gets to 0 it stops the code from counting lower than 0 that's why enable = nil, I don't want to change anything of the code I want how to make the player get kicked?

local player = game.Players.LocalPlayer
enable = true


script.Parent.MouseLeave:Connect(function()
    repeat wait() until script.Parent.Text == "0"
    if script.Parent.Text == "0" then
        while script.Parent.MouseMoved do
            enable = nil
                script.Parent.Text = ("0")
            player:Kick("Count down ended")
        end
    end
end)


0
I don't think you can kick a player using LocalScripts. SirGamezy 186 — 3y
0
Then what do i use? thekiler_king 17 — 3y
0
You can kick yourself using localscripts but you cant kick other players for that you need to use a script VerdommeMan 1479 — 3y

Answer this question