Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I add custom peramiters to connected functions?

Asked by 2 years ago

local function LvlHover(Val) AnimModule.LevelHover(LevelsLabel, Val) end

LevelsLabel.MouseEnter:Connect(LvlHover)(1)

LevelsLabel.MouseLeave:Connect(LvlHover)(2)


Why dosent this work? Btw its for tweening gui, heres the script:


function Animations.LevelHover (Gui, Val) local TwInfo = TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0) local Tween

local Rot

if Val == true then
    Rot = 0
else
    Rot = 10
end

Tween = TweenService:Create(Gui, TwInfo, {Rotation =  Rot})
Tween:Play()

end


Thank You!

0
The formating messed up lol GamerN0101 0 — 2y
0
I fixed it GamerN0101 0 — 2y

Answer this question