Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

BrickColor won't work in my game, Roblox is unconvential.?

Asked by 3 years ago

I have the simplest script here, but it doesn't work. I cease to figure out way. Any pointers?

part1 = script.Parent




while true do

    part1.BrickColor.new("Light yellow")
    wait(1)


     BrickColor.new("Pastel Blue")
    wait(1)
end

0
part1.BrickColor = BrickColor.new("Light yellow") or whatever color Edit: you have to actually assign BrickColor, which you aren't doing in your script. https://developer.roblox.com/en-us/api-reference/datatype/BrickColor msuperson24 69 — 3y
0
its not roblox's fault for your mistake. zadobyte 692 — 3y

1 answer

Log in to vote
3
Answered by 3 years ago
Edited 3 years ago

You need to make a local variable with the part1 = script.Parent and for good measures try and make it like this --> local part1 = script.Parent.Part1

You also need to make sure it is a script and it goes in the Part in question

Make sure to also always when your scripting make a reference to the part-property in question for example part1.BrickColor and then equate that called property to the actual property function. For example - part1.BrickColor = BrickColor.new('Color')

Now here is an example in your case -

local part1 = script.Parent.Parent.Part1

while true do
    wait(3)
    part1.BrickColor = BrickColor.new('Light blue')
    wait(1)
    part1.BrickColor = BrickColor.new('Really black')
end

Ad

Answer this question