Im trying to make party lights but idk why this script isn't working. Im pretty sure Im missing something.
script.Parent = game.Workspace.Party
Party = script.Parent
wait(5)
Party.BrickColor = Pastel Blue
wait(0.5)
Party.BrickColor = Really black
Im trying to make party lights but idk why this script isn't working. Im pretty sure Im missing something.
script.Parent = game.Workspace.Party
Party = script.Parent
wait(5)
Party.BrickColor = Pastel Blue
wait(0.5)
Party.BrickColor = Really black
To set a property of the BrickColor type, you must use the BrickColor.new function, which works like this:
Party.BrickColor = BrickColor.new("Pastel blue")
Your entire script would look like this:
script.Parent = game.Workspace.Party
Party = script.Parent
wait(5)
Party.BrickColor = BrickColor.new("Pastel blue")
wait(0.5)
Party.BrickColor = BrickColor.new("Really black")
I know this is already answered, but I just wanted to give some advice, maybe it would benefit you in future.
you can use while true do if you are making something like a disco light, basically while true do repeats your command infinitely.
It should be something like this:
local block = game.Workspace.Part
while true do
block.BrickColor = BrickColor.Red() --You can change the color
wait(2) --You can change the time which the script waits until changing color
block.BrickColor = BrickColor.Blue()
wait(2)
end
Just make sure you end your commands with wait() so the color changes infinitely.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
You can also pass a Color3 to a BrickColor e.g. BrickColor.new(Color3.fromRGB(0,0,0))