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 » Scripters
Home Search
 

Re: Why doesnt this script work?

Previous Thread :: Next Thread 
seblind is online. 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
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
04 Aug 2015 09:47 AM
Have to make the function react to touched... Silly.
Report Abuse
teslobo is not online. 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 is not online. 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 is online. 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
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
04 Aug 2015 09:49 AM
I mess with GUI's a lot... I almost (ALMOST) said the same XP
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
04 Aug 2015 09:51 AM
function -namehere.-(hit)
Report Abuse
seblind is online. 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
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
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 is online. 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 is online. 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 is not online. 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 is online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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