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: Help with a script.

Previous Thread :: Next Thread 
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
14 Sep 2011 12:33 PM
I want a script that changes the color of anything that touches it. This is my attempt...


A = script.Parent

function onTouched(Part)
Part.BrickColor = script.Parent.BrickColor
wait(0.5)
end

connection = A.Touched:connect(onTouched)
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
14 Sep 2011 12:35 PM
What is the meaning it does? Making a script turn into the same color?

A = script.Parent
function onTouched(Part)
Part.BrickColor = script.Parent.BrickColor
wait(0.5)
end

A.Touched:connect(onTouched)

connection = is not needed...

~This makes absolutely no sense
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
14 Sep 2011 12:36 PM
Sorry making the parent of the script turning into the same color.

~This makes absolutely no sense
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
14 Sep 2011 12:36 PM
Useless wait is useless.
Report Abuse
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
14 Sep 2011 12:43 PM
It still does not work.
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
14 Sep 2011 12:44 PM
Cause you change it to the same brickcolor like it already is >:O

~This makes absolutely no sense
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
14 Sep 2011 12:47 PM
Try this:

A = script.Parent
function onTouched(Part)
Part.BrickColor = A.BrickColor
end

A.Touched:connect(onTouched)


Oh no now i see what you're doing sorry i didn't payd attention :3


~This makes absolutely no sense
Report Abuse
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
14 Sep 2011 12:49 PM
It still no work.
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
14 Sep 2011 12:52 PM
Is it in the part you need to touch?

~This makes absolutely no sense
Report Abuse
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
14 Sep 2011 12:54 PM
Yup. all is good, and it should be working, but its not.
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
14 Sep 2011 12:58 PM
[ Content Deleted ]
Report Abuse
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
14 Sep 2011 12:59 PM
@My

It does not work.
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
14 Sep 2011 01:00 PM
[ Content Deleted ]
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
14 Sep 2011 01:01 PM
[ Content Deleted ]
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
14 Sep 2011 01:06 PM
@WOOF that's the same princip i think this guy is doing something wrong...

~This makes absolutely no sense
Report Abuse
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
14 Sep 2011 01:08 PM
All it is, is a part, that changes a bricks bodycolor when touched.
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
14 Sep 2011 01:08 PM
If i test it it works...

~This makes absolutely no sense
Report Abuse
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
14 Sep 2011 01:10 PM
@demon

Your using studio right?
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
14 Sep 2011 01:11 PM
Yeah

~This makes absolutely no sense
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
14 Sep 2011 01:12 PM
[ Content Deleted ]
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
14 Sep 2011 01:15 PM
This should work:

A = script.Parent
A.Touched:connect(function(p)
p.BrickColor = A.BrickColor
end)

~This makes absolutely no sense
Report Abuse
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
14 Sep 2011 01:25 PM
Must be my computer, it still no works D: I'll just make something else :)
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
14 Sep 2011 01:26 PM
Are you sure the script is in the part you need to touch?
isn't disabled?

~This makes absolutely no sense
Report Abuse
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
14 Sep 2011 01:32 PM
I'm sure.
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
14 Sep 2011 01:42 PM
I can't think up what's wrong...

~This makes absolutely no sense
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