generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: why doesn't this work

Previous Thread :: Next Thread 
kaspar1230 is not online. kaspar1230
Joined: 25 Apr 2013
Total Posts: 481
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
kaspar1230 is not online. kaspar1230
Joined: 25 Apr 2013
Total Posts: 481
30 Jun 2016 04:24 AM
I have no idea!! i checked everything..


#code game.players.kaspar1230:Remove("hahaa kicked")
Report Abuse
Meowth552 is not online. 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
kaspar1230 is not online. kaspar1230
Joined: 25 Apr 2013
Total Posts: 481
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 is not online. 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
kaspar1230 is not online. kaspar1230
Joined: 25 Apr 2013
Total Posts: 481
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 is not online. 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
kaspar1230 is not online. kaspar1230
Joined: 25 Apr 2013
Total Posts: 481
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 is not online. 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
kaspar1230 is not online. kaspar1230
Joined: 25 Apr 2013
Total Posts: 481
30 Jun 2016 04:34 AM
and .TextBox.Text:Kick wouldn't work


#code game.players.kaspar1230:Remove("hahaa kicked")
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image