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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Help needed.

Previous Thread :: Next Thread 
slickdude16 is not online. slickdude16
Joined: 10 May 2011
Total Posts: 149
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 is not online. 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
slickdude16 is not online. slickdude16
Joined: 10 May 2011
Total Posts: 149
31 Aug 2013 12:21 AM
What would "jerk" be? Players?
Report Abuse
janthran2 is not online. 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
slickdude16 is not online. slickdude16
Joined: 10 May 2011
Total Posts: 149
31 Aug 2013 12:22 AM
I didn't know jerk was a function, thanks.
Report Abuse
janthran2 is not online. 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
slickdude16 is not online. slickdude16
Joined: 10 May 2011
Total Posts: 149
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
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
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
slickdude16 is not online. slickdude16
Joined: 10 May 2011
Total Posts: 149
31 Aug 2013 12:28 AM
No I'm not much of a scripter :l guis are easy for me.
Report Abuse
pikaardbackupalt is not online. pikaardbackupalt
Joined: 07 Apr 2013
Total Posts: 53
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
pikaardbackupalt is not online. pikaardbackupalt
Joined: 07 Apr 2013
Total Posts: 53
31 Aug 2013 01:04 AM
*Why
Report Abuse
noah is not online. 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
pikaardbackupalt is not online. pikaardbackupalt
Joined: 07 Apr 2013
Total Posts: 53
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
pikaardbackupalt is not online. pikaardbackupalt
Joined: 07 Apr 2013
Total Posts: 53
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
slickdude16 is not online. slickdude16
Joined: 10 May 2011
Total Posts: 149
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
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
31 Aug 2013 01:25 AM
Just Instance new an explosion into their torso and or set their health to zero...
Report Abuse
pikaardbackupalt is not online. pikaardbackupalt
Joined: 07 Apr 2013
Total Posts: 53
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
pikaardbackupalt is not online. pikaardbackupalt
Joined: 07 Apr 2013
Total Posts: 53
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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