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

How can I make a ScreenGUI tween onto the screen when a part is clicked?

In workspace I have a control room of buttons used for a ROBLOX gameshow set. My goal is to have a GUI pop-up from the side screen, it will tween so it slides onto screen. How can achieve this? I'm also using buttons so when a button is pressed ("A part") the tween happens. Thankyou!

2 answers

✓ Accepted answer

I would personally recommend putting your code for this in a localscript to eliminate unnecessary network traffic and because this is a purely client-side effect. You'd want to listen to mouse clicks on the click detector and tween your gui in on a click. Here's some sample code:

local clickDetector = path.to.clickdetector
local gui = path.to.gui

clickDetector.MouseClick:Connect(function()
	gui:TweenPosition(...)
end)

Hopefully this helps you! Here are some links to check out:

https://developer.roblox.com/en-us/api-reference/class/ClickDetector

https://developer.roblox.com/en-us/api-reference/function/GuiObject/TweenPosition

2 comments

0

Thankyou! :)

0

If this answered your question, please accept it! Would be much appreciated.

I Recommend for you to watch Alvin Blox tutorial on this ...

2 comments

1

Do not post anything if you're unable to provide a proper answer yourself, downvote

0

lmao this guy is a legend, upvote from me

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