You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to make a part move to a certain position when i hover my mouse over it with tweens. -
What is the issue? Include screenshots / videos if possible!
For some reason none of my script wants to work, i tried debugging using “print()” but i found out that it isnt printing anything (no, the script isnt disabled).
local tween = game:GetService("TweenService")
local button = script.Parent
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local originalpositiontween = TweenInfo.new(0.5,Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local originalposition = {
Position = UDim2.new(-251.877, 6.019, 406.607)
}
local movedpositiontween = TweenInfo.new(0.5,Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local movedposition = {
Position = UDim2.new(-252.278, 6.019, 406.128)
}
local hover = tween:Create(button,movedpositiontween,movedposition)
local leavehover = tween:Create(button,originalpositiontween,originalposition)
button.MouseHoverEnter:Connect(function()
hover:Play()
print("hover")
end)
button.MouseHoverLeave:Connect(function()
leavehover:Play()
print("leave")
end)
and here is how my part is organized:
(ignore the surfacegui, its just for decoration.)
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Yes but i couldnt find anything related to what i was looking for.