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: REALLY BASIC SCRIPT NOT WORKING NEED HELP!

Previous Thread :: Next Thread 
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
17 Apr 2012 06:42 PM
function onHit(hit)script.Parent.BrickColor = BrickColor.new("Really red")
end
Title says all script is not working please help me out thank you.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Apr 2012 06:43 PM
I would add an if statment to check things, but you are mainly missing a connection line.

script.Parent.Touched:connect(onHit)

† KMXD †
Report Abuse
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
17 Apr 2012 06:55 PM
Thanks!
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Apr 2012 06:57 PM
No problem.
  
† KMXD †
Report Abuse
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
17 Apr 2012 07:01 PM
function onHit(hit)
if hit.Parent.Humanoid ~= nil then
script.Parent.BrickColor = BrickColor.new("Really red")
end
end
script.Parent.Touched:connect(onHit)
Report Abuse
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
17 Apr 2012 07:02 PM
Wait.. How do you put that in the script please rewrite the script with the modification.
Report Abuse
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
17 Apr 2012 07:03 PM
OOOOOOHHHH makes more sense tanks
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Apr 2012 07:03 PM
^What he did.

† KMXD †
Report Abuse
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
17 Apr 2012 07:04 PM
Working now?
Report Abuse
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
17 Apr 2012 07:05 PM
STILL DOSNT WORK UgGGH
Report Abuse
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
17 Apr 2012 07:06 PM
Insert>Object>Part
Insert>Object>Script
Paste my script into there.
Save, and play in online mode or play in solo.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Apr 2012 07:06 PM
What is this supposed to change the color of? Anything?

† KMXD †
Report Abuse
dnd256 is not online. dnd256
Joined: 24 Mar 2009
Total Posts: 1373
17 Apr 2012 07:36 PM
How is it not working? Can you post the error code?
Report Abuse
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
17 Apr 2012 07:51 PM
Np error code just will not work
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Apr 2012 07:52 PM
(sigh)

"What is this supposed to change the color of? Anything?"

† KMXD †
Report Abuse
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
17 Apr 2012 08:02 PM
Just a brick thatyou walk on to make it change
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Apr 2012 08:03 PM
Your legs? Then try:

function onHit(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.BrickColor = BrickColor.new("Really red")
end
end
script.Parent.Touched:connect(onHit)

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Apr 2012 08:04 PM
*Facepalm* I understand you now...

function onHit(hit)
if hit.Parent:FindFirstChild("Humanoid") then
script.Parent.BrickColor = BrickColor.new("Really red")
end
end
script.Parent.Touched:connect(onHit)

† KMXD †
Report Abuse
testdummy5000 is not online. testdummy5000
Joined: 04 Jun 2010
Total Posts: 818
23 Apr 2012 11:39 PM
THANK YOU O_O
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
24 Apr 2012 08:21 PM
No problem...

† KMXD †
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