Whenever I run this piece of code (by clicking on a button), it gives me the error code, "ProgressBar is not a valid part of Frame".
ProgressBar = script.Parent.Parent.Progress
ProgressBar:TweenSize(UDim2.new(1, 0, 0, 12), "Out", "Quad", 2)
while Percent < 4 do
print(Percent)
Percent = Percent + 1
wait(.5)
end
if Percent == 4 then
ProgressBar.Size = UDim2.new(0, 0, 0, 12)
There is more code, but I don't think it's related, so I didn't post it. K thanks.

2 comments
:/. That doesn't sound like the right error. Also, if the code is unrelated, don't post it.
Use FindFirstChild()