So I have this script,
local count = script.Parent.Height.Value
wait(3)
while true do
if count < 7.5 then
script.Parent.CFrame=script.Parent.CFrame+Vector3.new(0,0.1,0)
count = count + 0.1
wait(0.1)
else
if count >= 7.5 then
script.Parent.CFrame=script.Parent.CFrame+Vector3.new(0,-7.5,0)
count = 7.5
end
but it doesnt work at the top line 'count' is a number value under the same group as the brick(the scripts parent)
the 'end' on the bottom line is underlined in red and says "expected 'end' (to close 'else' at line nine), got
I dont understand whats wrong? the idea is that the scripts parent gets raised in increases of .1 every 0.1 seconds until the height reaces 7.5 in which case it should lower the part by 7.5 studs and continue the proccess

1 comment
thx alot