Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a moving GUI when clicked?

Im planning to make an awesome game, just want some help

1 answer

✓ Accepted answer

If you want it to move to a certain position when clicked you can do

--Must be in a TextButton or ImageButton
script.Parent.MouseButton1Down:connect(function()
	script.Parent:TweenPosition(UDim2.new(.5, 0, .5, 0));
end);

This will move the gui to the position (.5, 0, .5, 0) on screen. The first set (.5, 0) is the X position, in this set we have percent of screen (.5) and pixels (0) the second set is the same but with Y position. You can change these numbers to be whatever you want.

1 comment

0

Hope this answered you question and helped!

This discussion is preserved as it was. New answers, comments, and votes are closed.