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

How do I make gui slightly move when mouse is hovering over it?

Asked by 4 years ago
Edited 4 years ago

I am trying to make a cool gui, but I want the button to slightly move upwards when the player's mouse is hovering over it(which I mean by on top of it). It's kind of like this game I played because when my mouse was on top of the folder it slides over for me to open it. anybody got an idea?

0
research mouse hovers and research location changes User#30567 0 — 4y
0
do you mean a surface gui or a screen gui CoolMcroy 35 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

If you want to move a ScreenGui then you can do this in a Local Script I believe

local plr = game.Player.LocalPlayer

plr.PlayerGui.[<Gui Name>].Frame.TextButton.MouseEnter:Connect(function()
    plr.PlayerGui.[<Gui Name>].Frame.TextButton.Position= plr.PlayerGui.[<Gui Name>].Frame.TextButton.Position + UDim2.new(-- forgot how udim2 works)
end)
Ad
Log in to vote
0
Answered by 4 years ago

Use the event MouseEnter to make your Frame tween upwards, and the event MouseLeave to tween it down.

Answer this question