Mouse hover script not working

You can write your topic however you want, but you need to answer these questions:

  1. 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.

  2. 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:
image
(ignore the surfacegui, its just for decoration.)

  1. 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.

This is what the roblox API reference says about click detectors… best to move your local script it wont run this way:

ClickDetector events fire on both the client and the server. Since a LocalScript will only run if it descends from a Player or Player’s Character , it’s usually not useful to put a LocalScript inside a ClickDetector since the script won’t run, or the object won’t be clickable. If you need a LocalScript to detect ClickDetector events, StarterPlayerScripts may be a better place instead.

Ok thanks, i will try this out.