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
 

Color Car Gui Script

Previous Thread :: Next Thread 
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
27 Apr 2012 10:03 AM
I'm trying to make a script for my friend who wants a Car Paint shop on his game where you can change your cars color but I'm having trouble making the script because Ouput says theres nothing wrong with it but it won't work. Can somebody help me?

t = script.Parent.Parent.Parent.Parent.Parent.Character.Car
function onClicked()
c = t:children()
for n = 1, #c do
if (c[n].className == "Part") then
local P = (c[n]:findFirstChild("Color")
if (P~=nil) then
c[n].BrickColor = Color3.new("Bright Red")
end
end

if (c[n].className == "WedgePart") then
local W = (c[n]:findFirstChild("Color")
if (W~=nil) then
c[n].BrickColor = Color3.new("Bright Red")
end
end
end
end
script.Parent.MouseButton1Down:connect(onClicked)
Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
27 Apr 2012 10:05 AM
Try putting prints in various locations, that may help.
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
27 Apr 2012 10:05 AM
Ok.
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
27 Apr 2012 11:29 AM
Nothing. It shows all of the prints and doesn't say anything is wrong.
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
27 Apr 2012 11:29 AM
Can anybody fix this?

t = script.Parent.Parent.Parent.Parent.Parent.Character.Car
function onClicked()
c = t:children()
for n = 1, #c do
if (c[n].className == "Part") then
local P = c[n]:findFirstChild("Color")
if (P~=nil) then
c[n].BrickColor = Color3.new("Bright Red")
end
end

if (c[n].className == "WedgePart") then
local W = c[n]:findFirstChild("Color")
if (W~=nil) then
c[n].BrickColor = Color3.new("Bright Red")
end
end
end
end
script.Parent.MouseButton1Down:connect(onClicked)
Report Abuse
BAUER102 is online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
27 Apr 2012 12:17 PM
The Roblox output seems to be glitchy in the last time. I've had multiple cases of errors and the output didn't noticed it.

I'll look at your script.
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
28 Apr 2012 03:55 AM
Thanks.
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
28 Apr 2012 04:34 AM
Can nobody help because I'm having no luck?
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
28 Apr 2012 04:49 AM
I tried this on too but it didn't work either;

t = script.Parent.Parent.Parent.Parent.Parent.Character.Car
function onClicked()
c = t:children()
for n = 1, #c do
if (c[n].className == "Part") then
local P = c[n]:findFirstChild("Color")
if (P~=nil) then
c[n].BrickColor = BrickColor.new(21)
end
end

if (c[n].className == "WedgePart") then
local W = c[n]:findFirstChild("Color")
if (W~=nil) then
c[n].BrickColor = BrickColor.new(21)
end
end
end
end
script.Parent.MouseButton1Down:connect(onClicked)
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
28 Apr 2012 04:51 AM
It doesn't matter guys. I've done it. YAY!
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