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: Troubles

Previous Thread :: Next Thread 
froufrou21 is not online. froufrou21
Joined: 17 Jul 2010
Total Posts: 78
27 Oct 2012 12:52 PM
I am having a few troubles getting a hidden blade on a morph and a gui to work together. I'm using the jetpack design for it. This is what's in the scripts:

function onClick(mouse)

player.Arm2.Blade.Transparency = 0
player.Arm2.Handle.Death.Disabled = false

end

script.Parent.MouseButton1Down:connect(onClick)

And the other is:

function onClick(mouse)

player.Arm2.Blade.Transparency = 1
player.Arm2.Handle.Death.Disabled = true

end

script.Parent.MouseButton1Down:connect(onClick)

'Blade' being the weapon which shows, and 'Death' being a script in the brick that kills. My problem is I can't get it to look like it retracts or extends, or disable the killing script when it is needed.
Report Abuse
froufrou21 is not online. froufrou21
Joined: 17 Jul 2010
Total Posts: 78
27 Oct 2012 01:00 PM
Any help...?
Report Abuse
froufrou21 is not online. froufrou21
Joined: 17 Jul 2010
Total Posts: 78
28 Oct 2012 10:17 AM
No help, then?
Report Abuse
veerstrong is not online. veerstrong
Joined: 23 Jun 2009
Total Posts: 2450
28 Oct 2012 10:22 AM
You didn't reference what 'player' is.
Report Abuse
froufrou21 is not online. froufrou21
Joined: 17 Jul 2010
Total Posts: 78
17 Nov 2012 09:36 AM
Yeah, I realized that when I went to a friend's, thanks for replying, and it's fixed now.
Report Abuse
froufrou21 is not online. froufrou21
Joined: 17 Jul 2010
Total Posts: 78
15 Dec 2012 12:22 PM
Now, I have a new problem for a gui. It needs to change your health upon clicking the gui button. Here's it:

local player = script.Parent.Parent.Parent.Parent.Parent.Parent.Workspace.Player.Humanoid

function onClick(mouse)

player.Health = 2600
player.MaxHealth = 2600

end

script.Parent.MouseButton1Down:connect(onClick)
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
15 Dec 2012 12:25 PM
FGS I am tired of people doing this. Clicking a gui returns no arguments, remove mouse from the parenthesis.
Report Abuse
froufrou21 is not online. froufrou21
Joined: 17 Jul 2010
Total Posts: 78
15 Dec 2012 12:29 PM
Still, it doesn't work.
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
15 Dec 2012 12:30 PM
And Player is definitely in the workspace? Even in test mode you don't have player, it's Player1.
Report Abuse
froufrou21 is not online. froufrou21
Joined: 17 Jul 2010
Total Posts: 78
15 Dec 2012 12:32 PM
And what do you mean by that? I'm in Build Mode, and all I'm doing is editing and modifying a script from a Jetpack
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
15 Dec 2012 12:36 PM
local player = script.Parent.Parent.Parent.Parent.Parent.Parent.Workspace.Player.Humanoid

--I am worried about that line. Is the character definitely called Player?
Report Abuse
froufrou21 is not online. froufrou21
Joined: 17 Jul 2010
Total Posts: 78
15 Dec 2012 12:38 PM
So, change it back to Character, if I'm understanding this?
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
15 Dec 2012 12:41 PM
No, what is the name of the Player/Character that you are looking for, e.g. Jelly134, Player1, froufrou21.
Report Abuse
froufrou21 is not online. froufrou21
Joined: 17 Jul 2010
Total Posts: 78
15 Dec 2012 12:42 PM
Well, err. I'm not sure what to do, if I put in my name, it'd only work for me, correct? I need it to work for the majority of players.
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
15 Dec 2012 12:43 PM
Nvm, this is too painful. I'm just going to assume what you want and I am writing the script for you:


--Put this in a LocalScript rather than a normal one

local player = game.Players.LocalPlayer.Character.Humanoid

script.Parent.MouseButton1Down:connect(function()
player.Health = 2600
player.MaxHealth = 2600
end)
Report Abuse
froufrou21 is not online. froufrou21
Joined: 17 Jul 2010
Total Posts: 78
15 Dec 2012 12:46 PM
Well. You did it. Thanks Jelly.
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
15 Dec 2012 12:48 PM
Lol, looking back I was very stupid. I didn't realise what you wanted at first :P

This chest infection must be affecting me more than I realise...
Report Abuse
sharkcroc is not online. sharkcroc
Joined: 21 Feb 2010
Total Posts: 1
26 Dec 2012 07:16 PM
Hello
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