For limit is a number but it says it isn't
function amount() script.Parent.Parent.amount.Visible = true script.Parent.Parent.amount.OK.MouseButton1Click:Connect(function() script.Parent.Parent.amount.Visible = false return tonumber(script.Parent.Parent.amount.input.Text) end) end function commands() local num = amount() local cmd = script.Parent.Parent.bar.Text if cmd == "cmds" then print("commands: \n cmds \n test") elseif cmd == "test" then for i=1,num do print("hi") wait(0) end end end script.Parent.MouseButton1Click:Connect(commands)