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

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

Asked by 3 years ago

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

Log in to vote
0
Answered by
Optikk 499 Donator Moderation Voter
3 years ago

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

0
Thankyou! :) GeoXoro_15 2 — 3y
0
If this answered your question, please accept it! Would be much appreciated. Optikk 499 — 3y
Ad
Log in to vote
-1
Answered by 3 years ago

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

1
Do not post anything if you're unable to provide a proper answer yourself, downvote User#834 0 — 3y
0
lmao this guy is a legend, upvote from me imKirda 4491 — 3y

Answer this question