After switching from a screengui menu to a surfacegui my button tween stopped working and i’m not sure why
local TweenService = game:GetService("TweenService")
local Button = script.Parent
local TweenButton = script.Parent.Parent.ChargeCredits
local exitTween = TweenService:Create(TweenButton, TweenInfo.new(0.15), {Transparency = 1})
local enterTween = TweenService:Create(TweenButton, TweenInfo.new(0.15), {Transparency = 0})
TweenButton.Transparency = 1
Button.MouseEnter:Connect(function()
enterTween:Play()
Button.UIStroke.Color = Color3.fromRGB(68, 68, 68)
Button.UIStroke.Thickness = 4
end)
Button.MouseLeave:Connect(function()
exitTween:Play()
Button.UIStroke.Color = Color3.fromRGB(38, 38, 38)
Button.UIStroke.Thickness = 3
end)
Button.Activated:Connect(function()
exitTween:Play()
Button.UIStroke.Color = Color3.fromRGB(38, 38, 38)
Button.UIStroke.Thickness = 3
end)
(No error message)