seblind
|
  |
| Joined: 10 Aug 2011 |
| Total Posts: 91 |
|
|
| 04 Aug 2015 09:45 AM |
This script is should change the brick color of its parent but it doesnt.
local coloroff=BrickColor.new("Bright red")
function changecolor() script.Parent.BrickColor=coloroff end
script.Parent.Touched:connect(changecolor) |
|
|
| Report Abuse |
|
|
|
| 04 Aug 2015 09:47 AM |
| Have to make the function react to touched... Silly. |
|
|
| Report Abuse |
|
|
teslobo
|
  |
| Joined: 27 Mar 2010 |
| Total Posts: 18828 |
|
|
| 04 Aug 2015 09:48 AM |
The property is called Color, not BrickColor.
Original Post Why doesnt this script work? Posted by seblind on 08-04-2015 09:45 AM This script is should change the brick color of its parent but it doesnt.
local coloroff=BrickColor.new("Bright red")
function changecolor() script.Parent.Color=coloroff end
script.Parent.Touched:connect(changecolor
|
|
|
| Report Abuse |
|
|
teslobo
|
  |
| Joined: 27 Mar 2010 |
| Total Posts: 18828 |
|
|
| 04 Aug 2015 09:49 AM |
Nope ignore me. I've been messing with GUIs for too long.
|
|
|
| Report Abuse |
|
|
seblind
|
  |
| Joined: 10 Aug 2011 |
| Total Posts: 91 |
|
|
| 04 Aug 2015 09:49 AM |
And how do i do that .....? yeah sorry im a noob when it comes to scripting :( |
|
|
| Report Abuse |
|
|
|
| 04 Aug 2015 09:49 AM |
| I mess with GUI's a lot... I almost (ALMOST) said the same XP |
|
|
| Report Abuse |
|
|
| |
|
seblind
|
  |
| Joined: 10 Aug 2011 |
| Total Posts: 91 |
|
|
| 04 Aug 2015 09:57 AM |
@teslobo
eh sorry, you must have said your comment while i was writing my reply to Meowcatmaster so i didnt see your comment.
well anyways. I tried what you said
script.Parent.Color=coloroff
local coloroff=BrickColor.new("Bright red")
And it still doesnt work |
|
|
| Report Abuse |
|
|
|
| 04 Aug 2015 10:00 AM |
Here's the script you need... local coloroff=BrickColor.new("Bright red")
function changecolor(hit) --How to make it proc when touched. script.Parent.BrickColor=coloroff end
script.Parent.Touched:connect(changecolor)
|
|
|
| Report Abuse |
|
|
seblind
|
  |
| Joined: 10 Aug 2011 |
| Total Posts: 91 |
|
|
| 04 Aug 2015 10:09 AM |
| @Meowcatmaster i've copied exactly what you just said into my script and it still doesnt work.... |
|
|
| Report Abuse |
|
|
seblind
|
  |
| Joined: 10 Aug 2011 |
| Total Posts: 91 |
|
|
| 04 Aug 2015 10:19 AM |
I have just noticed that when i try to run the script it says "17:05:12.513 - This function is not yet enabled!"
What does it mean with that? just wtf? |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 04 Aug 2015 10:19 AM |
local part = script.Parent
part.Touched:connect(function() part.BrickColor = BrickColor.new("Bright red") end)
make sure its a server script in a brick
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
seblind
|
  |
| Joined: 10 Aug 2011 |
| Total Posts: 91 |
|
|
| 04 Aug 2015 10:22 AM |
IT WORKS IT WORKS FINALLY :D
Thank you :D |
|
|
| Report Abuse |
|
|