Im using game.ReplicatedStorage.Moduals.Spritesheets.FindNumber:GetAttribute("Number") ~= 1 to see if the value does not equal one, but it doesn’t seem work, what am I doing wrong?
The full code:
PlayerGui.Main.Inventory[7].MouseLeave:Connect(function()
if SlotToOpen ~= 7 or game.ReplicatedStorage.Moduals.Spritesheets.FindNumber:GetAttribute("Number") ~= 7 then
PlayerGui.Main.Inventory[7]:TweenPosition(
UDim2.new(0.65, 0,0.15, 0),
"Out",
"Quad",
.1,
true
)
end
end)
Exactly why he should learn it. It takes 10 minutes and it’s incredibly useful. Please don’t tell people to copy and paste. In some cases it is acceptable, but when its something really easy to learn, it is best to not copy and paste, so you can actually learn instead of relying on other people.
The problem is that tween service takes bunch of time to write + sometimes ure just lazy to remember the code, that’s why i copy and paste it and then adapt it instead of writing from the very start
PlayerGui.Main.Inventory[7], is a frame, one of seven frames in my inventory system, I am attempting to tween this Gui, and the game.ReplicatedStorage.Moduals.Spritesheets.FindNumber:GetAttribute("Number") ~= 1 is checking if the player has this frame open, but game.ReplicatedStorage.Moduals.Spritesheets.FindNumber:GetAttribute("Number") ~= 1 even if the value is equal to 1 it still tweens the Gui.
Hopefully this makes sense