In this script in a button in my hotbar system, I put a print statement and it printed each time after each line but it doesn’t actually run.
script.Parent.MouseButton1Up:Connect(function()
if script.Parent:GetAttribute("Equipped") == false then
script.Parent.Aesthetics.Enabled = false
game.TweenService:Create(script.Parent, TweenInfo.new(0.1, Enum.EasingStyle.Elastic), {Size = UDim2.new(0, 87, 0, 87)}):Play()
game.TweenService:Create(script.Parent.Outline, TweenInfo.new(0.1), {Transparency = 0}):Play()
script.Parent:SetAttribute("Equipped", true)
for _, Button in ipairs(script.Parent.Parent:GetChildren()) do
if Button:IsA("ImageButton") then
game.TweenService:Create(Button, TweenInfo.new(0.1, Enum.EasingStyle.Elastic), {Size = UDim2.new(0, 80, 0, 80)}):Play()
game.TweenService:Create(Button.Outline, TweenInfo.new(0.1), {Transparency = 0.5}):Play()
Button:SetAttribute("Equipped", false)
Button.Aesthetics.Enabled = true
end
end
elseif script.Parent:GetAttribute("Equipped") == true then
game.TweenService:Create(script.Parent, TweenInfo.new(0.1, Enum.EasingStyle.Elastic), {Size = UDim2.new(0, 80, 0, 80)}):Play()
game.TweenService:Create(script.Parent.Outline, TweenInfo.new(0.1), {Transparency = 0.5}):Play()
script.Parent:SetAttribute("Equipped", false)
script.Parent.Aesthetics.Enabled = true
end
end)