Brick = game.Workspace.Brick function FallThrough() if Brick.Transparency = 1 then Brick.CanCollide = False end FallThrough()
Shouldn't this work?
Calling the function only once will only make it run once. Using the Changed
event will call the function every time any property of the brick changes.
local Brick = Game.Workspace.Brick Brick.Changed:connect(function(prop) if prop == "Transparency" then if Brick.Transparency >= 1 then Brick.CanCollide = false else Brick.CanCollide = true end end end)
if Brick.Transparency = 1 then Brick.CanCollide = False
You forgot something here, you need to and an end to the false statement, and make false lowercase.
if Brick.Transparency = 1 then Brick.CanCollide = false end
Here's the full script:
Brick = game.Workspace.Brick function FallThrough() if Brick.Transparency = 1 then Brick.CanCollide = false end end FallThrough()
You Failed an if and then Statement
and Forgot to Add an End
Brick = game.Workspace.Brick function FallThrough() if Brick.Transparency == 1 then Brick.CanCollide = False end end FallThrough()
There you go.