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: such a simple script i feel silly....

Previous Thread :: Next Thread 
BEART12 is not online. BEART12
Joined: 22 Oct 2008
Total Posts: 3190
07 Dec 2013 12:16 PM
local Window = script.Parent
b = script.Parent.Boards



function ChangeHealth()
if script.Parent.Health == 4 then
b.Board1.Transparency = 1
end

end









script.Parent.Health.Changed:connect(ChangeHealth)





will not work for some reason....
Report Abuse
BEART12 is not online. BEART12
Joined: 22 Oct 2008
Total Posts: 3190
07 Dec 2013 03:33 PM
?Bumps
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
07 Dec 2013 03:34 PM
:Connect needs to be capitalized


✦мøяƴø子✦
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
07 Dec 2013 03:34 PM
Post it without all the unneeded spaces plez
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
07 Dec 2013 03:35 PM
script.Parent.Changed:connect(ChangeHealth) -- Maybe this?


Or maybe this



function ChangeHealth()
if script.Parent.Health <= 4 then -- == to <=
b.Board1.Transparency = 1
end

end
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
07 Dec 2013 03:35 PM
sorry mb wasn't thinking no it doesnt


✦мøяƴø子✦
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
07 Dec 2013 03:38 PM
local Window = script.Parent -- whats the need for?
b = script.Parent.Boards



function ChangeHealth()
if script.Parent.Health <= 4 then -- i mean you didnt use it here
b.Board1.Transparency = 1
end

end









script.Parent.Changed:connect(ChangeHealth)
Report Abuse
BEART12 is not online. BEART12
Joined: 22 Oct 2008
Total Posts: 3190
07 Dec 2013 03:55 PM
It needs to be equal and i found out its the

if script.Parent.Health == 4 then
b.Board1.Transparency = 1

That is not working the .changed function works.


Thanks
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
07 Dec 2013 03:56 PM
local Window = script.Parent
b = script.Parent.Boards

function ChangeHealth()
if script.Parent.Health.Value == 4 then
b.Board1.Transparency = 1
end
end

script.Parent.Health.Changed:connect(ChangeHealth)
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
07 Dec 2013 03:57 PM
What exactly do you want it to do?
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
07 Dec 2013 03:57 PM
<= 4 or ceil or floor it.
Report Abuse
BEART12 is not online. BEART12
Joined: 22 Oct 2008
Total Posts: 3190
07 Dec 2013 03:59 PM
Silly me! i forgot .Value i knew it would be something silly thanks to all that helped.
Report Abuse
SuperiorEternal is not online. SuperiorEternal
Joined: 22 Aug 2009
Total Posts: 2365
07 Dec 2013 04:27 PM
Are you trying to make it so if you like touch a brick, your health will be changed?
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