Hello! So I have this script which works perfect, except I only want it to stop at its very peak, I do not want it to move back down. Here is what I mean:
--this script would be inside the part
local brick=script.Parent --creating a new variable named brick, referencing our part. "script" is a built-in object that references the actual script.
while wait(1) do --wait a second before running the code again
for I=1,10 do --begin a "for" loop, we are going to move the part up very little by little to make it seem like it is sliding.
brick.Position=brick.Position+Vector3.new(0,0.1,0) --add 0.1 on the Y scale (Vertical) to increase the brick's position
wait() --wait a fraction of a millisecond, or else it doesn't appear as a sliding brick.
end --end the "for" loop
wait(1) --pause a second
for I=1,10 do --This section is pretty much just a repeat.
brick.Position=brick.Position+Vector3.new(0,-0.1,0) --subtract 0.1 on the Y scale (Vertical) to decrease the brick's position
wait()
end
end --end the loop

1 comment
A good practice is to keep the indentation, it will just cause you more problems in the future if you don't.