So this code here detects what is inputted inside the textbox. In this source of text here detects what word has been put in, and if ’ :wega ’ has been inputted, it shall detect and function something. Although, when I want the localscript to kick the player, it doesn’t kick whilst everything else is working.
MessageBox.Changed:Connect(function()
if MessageBox.Text ~= ":wega" or tick() - LastTime < 10 then return end
wega:Play()
WEGA.Visible = true
game.Players.LocalPlayer:Kick("WOW")
LastTime = tick()
end)
The localscript is inside of a gui > frame > imagelabel > textbox.
the script is inside the textbox.
I don’t believe you can kick people through a local script. Use a remote event to make it and a script in serverscriptserver with the rest of the code to kick the player.
Please never trust the client!
I know this is 2 years later, but instead you should always use the server to kick, by using the client, it can be intercepted and stopped by exploiters.