function Changed() if game.Workspace.DoorOpen.Value == true then script.Parent.Position = Vector3(0, 8.5, 138) wait(1) end end game.Workspace.Game.Changed:connect(Changed)
How can I make this so the brick keeps on going up, but also gets smaller at the same time? I also have blocks above it, so if it trys to go to 8.5 it cant and just goes above the block. how can I make it so it can go through the block?
To make bricks go through other bricks you need to use CFrames.
To change the size of the brick, we use the .Size property.
function Changed() if game.Workspace.DoorOpen.Value == true then while wait() do script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0,0.1,0) script.Parent.FormFactor = "Custom" -- to change the size if script.Parent.Size.x > 0.2 then script.Parent.Size = script.Parent.Size - Vector3.new(0.1,0.1,0.1) end end end end game.Workspace.Game.Changed:connect(Changed)
Vector3.new(0, 8.5, 138)