I am basically making an update log that has SurfaceGui's and you'll have to click a button, causing the part to move up from the ground into view. If more information is needed, Comment please.
Regular Script:
OpenedOrClosed = game.Workspace.UpdateLog["Open/Closed"].Value
bool = true
--213, 169.4, 62
--213, 180.4, 62
script.Parent.MouseButton1Click:connect(function()
if OpenedOrClosed == "Closed" then
local Updatelog = game.Workspace.UpdateLog
while bool == true do
Updatelog.CFrame = Updatelog.CFrame * CFrame.new(0,0.1,0)
wait(0.01)
if Updatelog.CFrame == CFrame.new(213, 180.4, 62) then
bool = false
OpenedOrClosed = "Opened"
end
end
end
if OpenedOrClosed == "Opened" then
local Updatelog = game.Workspace.UpdateLog
while bool == false do
Updatelog.CFrame = Updatelog.CFrame * CFrame.new(0,-0.1,0)
wait(0.01)
if Updatelog.CFrame == CFrame.new(213, 169.4, 62) then
bool = true
OpenedOrClosed = "Closed"
end
end
end
end)

2 comments
When I click this, it does rise up but never stops.
What I can already tell you is that wait(0.01) is the same as wait(), since 0.03 is the minimum argument for wait().