|
| 31 Aug 2013 12:16 AM |
How do I make it so that when someone Clicks "I don't agree with server rules" they will explode without anybody else being exploded or the server shutting down?
----Code---- script.Parent.MouseButton1Click:connect(onClicked)game.workspace.players:Explode()
I know its not players I just didn't know what to fill in their :/ |
|
|
| Report Abuse |
|
|
janthran2
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 84 |
|
|
| 31 Aug 2013 12:20 AM |
why not just use
function jerk() while true do end end script.Parent.MouseButton1Click:connect(jerk) |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:21 AM |
| What would "jerk" be? Players? |
|
|
| Report Abuse |
|
|
janthran2
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 84 |
|
|
| 31 Aug 2013 12:22 AM |
it's a function anyone who disagrees with the rules == jerk and crash them |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:22 AM |
I didn't know jerk was a function, thanks.
|
|
|
| Report Abuse |
|
|
janthran2
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 84 |
|
|
| 31 Aug 2013 12:25 AM |
So you don't know much about functions then anything that's function X() makes it a function any time you type X() after that it'll run whatever is in the function Or you can use a :connect(X) and it'll also run the function |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:26 AM |
It didn't work. I want the person who didn't agree to explode or die here is the code so far. ------------------------------------- print("Close button loaded")
button = script.Parent window = script.Parent.Parent.Parent.Parent
function onClicked(GUI) window:remove() end script.Parent.MouseButton1Click:connect(onClicked) ----------------------------------------------------------------------- I want them to explode or die instantly after they click I dis agree with the rules. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:26 AM |
*Facepalm* You can name functions anything function example(hit) print("K I get it now") hit:Remove() end script.Parent.Touched:connect(example) |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:28 AM |
| No I'm not much of a scripter :l guis are easy for me. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 01:03 AM |
| Wy don't you just make it so it they click they don't apply to the rules they just get kicked? |
|
|
| Report Abuse |
|
|
| |
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 31 Aug 2013 01:04 AM |
"I didn't know jerk was a function, thanks." Best quote ever, haha. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 01:08 AM |
Just add a button saying " I will not follow the rules" or what ever, then, a script in it, the button must be in a ScreenGui, nothing else, unless you can edit the script.
Add the script in the Button, Script:
finction onClick() script.Parent.Parent.Parent.Parent:Remove() end
script.Parent.MouseButton1Down:connect(onClick) |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 01:09 AM |
| If you want them to be kicked, use that. The "script.Parent.Parent.Parent.Parent:Remove()" will remove their player, kicking that player. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 01:23 AM |
| I know how to make them get kicked for pressing the gui button but I want them to explode or die instantly on click. I'll have it kick for now. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 01:25 AM |
| Just Instance new an explosion into their torso and or set their health to zero... |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 01:30 AM |
function click()E = Instance.new("Explosition") E.Parent = script.Parent.Parent.Parent.Parent.Character.Torso E.Position = script.Parent.Parent.Parent.Parent.Character.Torso.Position end
script.Parent.MouseButton1Down:connect(click)
This shoudl work. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 01:31 AM |
Oops, messed up one thing and a spelling mistake. Here:
function click() E = Instance.new("Explosition") E.Parent = script.Parent.Parent.Parent.Parent.Character.Torso E.Position = script.Parent.Parent.Parent.Parent.Character.Torso.Position end
script.Parent.MouseButton1Down:connect(click)
And; *Should |
|
|
| Report Abuse |
|
|