Need Some help with a script!

The inventory:
Screenshot 2022-09-25 175420

The Attribute:
Screenshot 2022-09-25 175539

Also, it is tweening the Gui but if the Attribute ~= 7 then don’t tween the Gui, but it tweens the Gui even if it is equal to 7

try Inventory[“7”] and tell me if it works.

it is tweening the Gui, but my issue is if the Attribute ~= 7 then tween the Gui, but its tweens the Gui even if it is equal to 7

It will tween regardless of the attribute if SlotToOpen is not 7. This is because in your condition you put “or” and not “and”