|
| 30 Jun 2016 04:16 AM |
please help me.
local Button = script.Parent local textBox = game.Players.kaspar1230.PlayerGui.ScreenGui.Gui.textBox
function onClick() game.Players[textBox.Text]:Kick("You have been kicked with an Admin GUI") end
Button.MouseButton1Click:connect(onClick)
it's not kicking the player..
#code game.players.kaspar1230:Remove("hahaa kicked") |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 04:24 AM |
I have no idea!! i checked everything..
#code game.players.kaspar1230:Remove("hahaa kicked") |
|
|
| Report Abuse |
|
|
Meowth552
|
  |
| Joined: 17 Dec 2009 |
| Total Posts: 2181 |
|
|
| 30 Jun 2016 04:28 AM |
You should read up on how to use onClicked.
Try using onClicked instead of onClick, also, it should be onClicked(playerWhoClicked). |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 04:30 AM |
LOL
this is basically you insert the name of a PLAYER who you want to kick inside a textbox and then it gets the text, when you press the kick button it kicks the player who you wrote inside the textbox!
#code game.players.kaspar1230:Remove("hahaa kicked") |
|
|
| Report Abuse |
|
|
Meowth552
|
  |
| Joined: 17 Dec 2009 |
| Total Posts: 2181 |
|
|
| 30 Jun 2016 04:31 AM |
| I understood that and I have no idea what it has to do with your issue. |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 04:31 AM |
I DONT WANT TO KICK THE PLAYER WHO CLICKED ON IT
#code game.players.kaspar1230:Remove("hahaa kicked") |
|
|
| Report Abuse |
|
|
Meowth552
|
  |
| Joined: 17 Dec 2009 |
| Total Posts: 2181 |
|
|
| 30 Jun 2016 04:32 AM |
game.Players[textBox.Text]:Kick("You have been kicked with an Admin GUI")
Have you tried replacing [textBox.Text] with .TextBox.Text:Kick ? |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 04:33 AM |
nvm i got it to work!!! thanks anyways for trying to help
#code game.players.kaspar1230:Remove("hahaa kicked") |
|
|
| Report Abuse |
|
|
annabet_h
|
  |
| Joined: 13 Mar 2016 |
| Total Posts: 1475 |
|
|
| 30 Jun 2016 04:33 AM |
local button = script.Parent local tb = game.Players.LocalPlayer.PlayerGui.ScreenGui.Gui.textBox
button.MouseButton1Down:connect(function() game.Players:FindFirstChild(tb.Text):Kick('u hev been kikd ecks de') end)
|
|
|
| Report Abuse |
|
|
|
| 30 Jun 2016 04:34 AM |
and .TextBox.Text:Kick wouldn't work
#code game.players.kaspar1230:Remove("hahaa kicked") |
|
|
| Report Abuse |
|
|