Basically there are two parts which have similar names that can be found in variables in my script. These two parts contain SurfaceGui's. One of these has a TextButton and a TextLabel inside of a Frame. The actual Update log is just a Part that has a SurfaceGui and multiple TextLabels to put in words. This part starts in the ground(Out of sight) and you must press the TextButton to have it rise out of the ground then stop and the TextLabel will have changed words. Then, pressing the TextButton again causes the Update log to lower back inside of the ground, with the TextLabel's words changing.
Now, it appears everything but the CFraming part of my script works. I think I might be using the wrong for loop, or using it incorrectly. I will explain problems at the bottom(Under Script)
This is the script(It's the Child of TextButton that must be clicked):
--Closed-- 213, 169.4, 62 -- I just put the position that is in properties when closed
--Opened-- 213, 180.4, 62 -- Same as Above, but when opened
--Press to view Update Log -- Starting Text for TextLabel
script.Parent.MouseButton1Click:connect(function()
local UL = game.Workspace.UpdateLog -- This is rising out of ground
local ULB = game.Workspace.UpdateLogButton.ControlGUI.Core.Desc
if UL.Status.Value == "Closed" then
for i = 169.4,180.4, 0.1 do
UL.CFrame = UL.CFrame * CFrame.new(0,i,0)
UL.Status.Value = "Opened"
ULB.Text = "Press to close Update Log"
end
elseif UL.Status.Value == "Opened" then
for i = 180.4,169.4, -0.1 do
UL.CFrame = UL.CFrame * CFrame.new(0,i,0)
UL.Status.Value = "Closed"
ULB.Text = "Press to view Update Log"
end
end
end)
Now, before I click any buttons while in test mode, this is it's current position 213, 169.4, 62 Now, I clicked the TextButton 1 time and this is it's new position 213, 19583.301, 62 Here is the second click 213, 38997.199, 62 My StringValue is changing from Opened to Closed every click. I hope I gave a MUCH better code( Even though it's not functioning correctly ) and better description.
Everything BUT CFrame seems to be working correctly. No Errors in Output

2 comments
Just do UL.CFrame = CFrame.new(UL.CFrame.X,i,UL.CFrame.Z)
LordDragonZord , This moves it to the correct position. The problem is that it's instantly AND the part is turned around 180Degrees; causing it to face away from viewer. I would like it to Rise smoothly out of the ground and face the correct position. I don't know how your change flipped it?