So I’ve just been trying to fix my button animation script, and this error randomly popped up. I have no idea how to fix it, or what causes it. Heres my script.
for i,button in pairs(script.Parent:GetDescendants()) do
if button:IsA("TextButton") or button:IsA("ImageButton") then
button.Activated:Connect(function()
end)
button.MouseEnter:Connect(function()
script.Parent["ui hover"]:Play()
button:TweenSize(button.Size *= 1.1) -- this line is the error
end)
button.MouseLeave:Connect(function()
script.Parent["ui hover"]:Play()
end)
end
end