while true do wait(4) script.Parent.BrickColor=BrickColor:("Bright red") wait(0.1) script.Parent:CanCollide = false wait(4) script.Parent.BrickColor=BrickColor:("Lime green") wait(0.1) script.Parent:CanCollide = true wait(0.1) end
What I'm trying to do is to change the colour of the script's parent ( a brick ) and also to make it uncancollided and then reversed in a continuous loop. I don't see why it wouldn't work, so anybody could give me some help on that?
Current output: 18:14:29.211 - Workspace.DisappearingBrick.Script:4: '<name>' expected near '('
You don't understand what :
is used for.
object:action()
means to do some action
to object
.
If you don't have an action, or you don't have an object, you don't use :
, you use .
Properties which you set with =
will never use :
, only .
-- these are not doing actions, it's just some plain ol' property of the object.
BrickColor
is not an object. It just holds onto a new
constructor that you can get with .
as in BrickColor.new("Bright red")
use script.Parent.BrickColor = BrickColor.new("Bright red")