I have this script that test if the Gui is on or off (Open or Closed)
The problem is probably the for i in pairs(Numbers) do
Script:
local Box = script.Parent.Main
local Open = script.Parent.Button.IsOpen
if Open == false then
script.Parent.Button.BackgroundColor3.r = 94
script.Parent.Button.BackgroundColor3.g = 211
script.Parent.Button.BackgroundColor3.b = 4
for i in pairs(0,-220,0.3,0) do -- "1"
Box.Position.X.Offset(i)
end
else
script.Parent.Button.BackgroundColor3.r = 211 -- It starts saying that the problem is here. So the script could actually be stopped from "1"
script.Parent.Button.BackgroundColor3.g = 25
script.Parent.Button.BackgroundColor3.b = 0
for i in pairs(0,0,0.3,0) do -- "2"
Box.Position.X.Offset(i)
end
end

2 comments
I assume that this entire block of code has to be either in a function or has to be looped because it will only check your statement the one time the code is run.
The script is working on the same way if it is looping or not. It is the Animations that have the Problem but I can't find out what it is.