script.Parent.MouseEnter:Connect(function()
script.Parent.Rotation = 1
wait(0.05)
script.Parent.Rotation = 4
wait(0.05)
script.Parent.Rotation = 7
wait(0.05)
script.Parent.Rotation = 11
wait(0.05)
script.Parent.menuicon.Frame.Position = -3
end)
script.Parent.MouseLeave:Connect(function()
script.Parent.Rotation = 11
wait(0.05)
script.Parent.Rotation = 7
wait(0.05)
script.Parent.Rotation = 4
wait(0.05)
script.Parent.Rotation = 0
wait(0.05)
script.Parent.menuicon.Frame.Rotation = 3
end)
the error message says: Unable to assign property Position. UDim2 expected, got number
Shouldn’t it be .Rotation?
You can take this reference for setting the object’s position:
Note: Gui object position has to be UDim2, not a valid number.
For example:
GuiObject.Position = UDim2.new(0, 0, 0, 0) --// Origin
If you’re wanting how to correctly modify the object properties, definitely use this site that most Roblox developers use
You have to use UDim2.new to affect the frames position. Using a stray number wont work because its missing parameters like the Y value.
If you aren’t sure how to use UDim2, look at this article UDim2