So basically I have been trying to make it so this button gets bigger when the mouse enters it.
Only problem is, BUGS JUST KEEP HAPPENING. I mean like what does “Unable to cast string to token” mean? I dont have anything called “token”
So I have decided to ask for help(should have done this ages ago)
So um how would I make it bigger? IF you seen anything weird in my code its prob cause I was following a tutorial and I have no idea what Im doing
local tweenMod = require(script:FindFirstChild('TweenMod'))
local tweenS = game:GetService('TweenService')
-- scale buttons stuff
local function callback(didcomplete)
if didcomplete then
print('Tweened!')
else
print('Failed to tween')
end
end
local function sizeButton(button,size)
button:TweenSize(size,"out","Sine",tweenMod.tween.speed,true)
end
-- tween buttons
local buttons = game:GetService('CollectionService'):GetTagged('MenuButton')
for _, button in pairs(buttons) do
if button:IsA('TextButton') then
button.MouseEnter:Connect(function()
print(button.Name)
-- the mouse has entered the button
-- the size
local size = UDim2.new(
button.Size.X.Scale/2,
0,
button.Size.Y.Scale/2,
0
)
-- scale it
sizeButton(button,size)
end)
end
end
And for your info I have looked all over the place and I have found nothing that works so. Yeah