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 » Scripting Helpers
Home Search
 

Re: Do you want a reset GUI script?

Previous Thread :: Next Thread 
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
14 Oct 2012 07:03 AM
function kill()
script.Parent.Parent.Parent.Parent.Character.Humanoid.Health = 0
end

script.Parent.MouseButton1Down:connect(kill)
Report Abuse
awas3 is not online. awas3
Joined: 24 Oct 2010
Total Posts: 2854
14 Oct 2012 07:23 AM
Easier way:


function kill()
script.Parent.Parent.Parent.Parent.Character:BreakJoints()
end

script.Parent.MouseButton1Down:connect(kill)

~A3~
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
14 Oct 2012 07:53 AM
best way if , since the path wont always be the same.
Also put this in a localscript, inside a gui button.

function kill()
game.Players.LocalPlayer.Character:BreakJoints()
end

script.Parent.MouseButton1Down:connect(kill)
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
14 Oct 2012 07:54 AM
idk why i put the "if" in my sentance ._.
Report Abuse
human is not online. human
Joined: 06 May 2007
Total Posts: 2765
14 Oct 2012 07:55 AM
It's easier/more efficient to use an anonymous function.
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
14 Oct 2012 08:15 AM
script.Parent.MouseButton1Click:connect(function()
game.Players.LocalPlayer.Character:BreakJoints()
end)

--In a local script
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
14 Oct 2012 09:38 AM
Local isn't needed for an easy reset GUI script.
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
14 Oct 2012 09:40 AM
OH, some good sword fighter has commented! :D
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
14 Oct 2012 09:41 AM
Well, I did the normal script.
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
14 Oct 2012 09:54 AM
Talkin' to yourself again?

http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information.
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
14 Oct 2012 08:24 PM
actually, using a local script is probably the most fool proof way
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
15 Oct 2012 02:05 PM
K, why?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
15 Oct 2012 02:09 PM
Because it's easier to use LocalPlayer.At least, IMO.

¤ ¤ † K M X D † ¤ ¤
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
15 Oct 2012 02:11 PM
YEAH BUT WHY? THAT IS WHAT I WANT TO HEAR? :Yelling mode:

~Immi
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
15 Oct 2012 02:12 PM
Local scripts are much more efficient and can find the player you want to do things to much easier...
Here's two of the best ways I can think of:

1) efficiency
script.Parent.MouseButton1Down:wait()
game:GetService("Players").LocalPlayer.Character:BreakJoints()

2) looks
script.Parent.Parent.Parent:LoadCharacter()

-- or, if you don't know how many parents it is until you find the character...
for _,v in pairs(game:GetService("Players"):GetPlayers())do
if script:IsDescendantOf(v)then
v:LoadCharacter()
end
end
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
15 Oct 2012 02:12 PM
Ok, I understand it already.
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
15 Oct 2012 02:13 PM
Yeah, but, it was just an easy GUI script, and it is just a button to click, and than you die.
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
15 Oct 2012 02:14 PM
Hey, thanks for getting me replies, that will get me reply back and getting more posts!
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
15 Oct 2012 02:15 PM
Plus, your script wouldn't always work, without editing it. If a beginner used it, he probably won't know how many parents to use. If you used a LocalScript and Game.Players.LocalPlayer, that wouldn't necessarily be a problem.

¤ ¤ † K M X D † ¤ ¤
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
15 Oct 2012 02:17 PM
Ok, ok, thanks.
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
16 Oct 2012 09:01 AM
Reply, please.
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
16 Oct 2012 09:22 AM
Why should we reply when you've already been helped?
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
16 Oct 2012 12:02 PM
^ I just want me to get more posts.


~Immi
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
18 Oct 2012 04:03 PM
LOL.

http://www.roblox.com/CeaselessSouls-Admin-Commands-Gui-based-item?id=92856199 -- Take one and enjoy! Read the description, has a lot of information.
Report Abuse
immithebest is not online. immithebest
Joined: 07 Mar 2012
Total Posts: 221
19 Oct 2012 12:56 AM
Same noob who spams for place visits.
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