So, I'm making a game, and I'm trying to make a brick come out of a wall once you touch a red X, and Currently it does not work
local function onTouch(hit)
print("X has been touched")
wait(0.1)
game.Workspace.Brick1.Anchored = false
wait(0.01)
game.Workspace.Brick1.Position = Vector3.new(-140.3, 21.704, -129.475)
wait(0.1)
game.Workspace.Brick1.Position = Vector3.new(-139.3, 21.704, -129.475)
wait(0.1)
game.Workspace.Brick1.Position = Vector3.new(-138.3, 21.704, -129.475)
wait(0.1)
game.Workspace.Brick1.Position = Vector3.new(-137.3, 21.704, -129.475)
wait(0.1)
game.Workspace.Brick1.Position = Vector3.new(-136.3, 21.704, -129.475)
wait(0.1)
game.Workspace.Brick1.Position = Vector3.new(-135.3, 21.704, -129.475)
wait(0.1)
end
script.Parent.Touched:Connect(onTouch)
Any advice? I cant tween yet unfortunately...

8 comments
Keep the brick anchored since you won't want the brick to be effected by gravity and add a denounce if needed
But the thing is I want it to like get pushed out then fall down so you can acess whats behind it
May be unanchored it when it done moving ? The brick will move very weird if you don't anchor it, and add a debounce
just tried it, It worked. Thanks!
;_; did i just lost 15 rep...
I'm new to this, what's rep? Is it reputation?
Yep, accept my answer gives me and you reputation :D
oh ok