Foxxive
(Vinny)
1
Whenever I try tweening a text label, it yields this error:

Not sure why, I’ve tried looking it up but no answers contain the solution to the problem I’m facing.
Code
local label = script.Parent.TextLabel
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
script.Parent.MouseEnter:Connect(function()
label:TweenPosition(UDim2.new(1, 0, 0, 0), 0.5, Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, false)
--tweenService:Create(label, tweenInfo, UDim2.new(1, 0, 0, 0))
end)
script.Parent.MouseLeave:Connect(function()
label:TweenPosition(UDim2.new(2.347, 0, 0, 0), 0.5, Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, false)
--tweenService:Create(label, tweenInfo, UDim2.new(2.347, 0, 0, 0))
end)
Help is appreciated
When you use GuiObject:TweenPosition() the parameters go as follows:
- End Position
- EasingDirection
- EasingStyle
- Time (in seconds)
- Override (optional)
- Callback (optional)
So this:
Should be this:
label:TweenPosition(UDim2.new(1, 0, 0, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.5, false)
And this:
Should be this:
label:TweenPosition(UDim2.new(2.347, 0, 0, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.5, false)
1 Like
Foxxive
(Vinny)
3
god why do these things have to be so precise in order wejhvwef
appreciate the help
system
(system)
Closed
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.