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

How do I make a SurfaceGUI text button activate this script when the button is clicked on?

Asked by 4 years ago

So I'm trying to make a game where clicking on a button on a part starts a script.

My script that activates when the button is clicked:

01local dup = game.Workspace
02local T = .5
03local size = Vector3.new (5,5,5)
04 
05function REP ()
06    while true do
07        local part = Instance.new("Part", dup)
08        wait()
09        part.Anchored = false
10        part.Transparency = T
11        part.BrickColor = BrickColor.new ('Baby blue')
12        part.Reflectance = T
13        part.Material = ("Glass")
14        part.Size = size
15        if wait == 0 then
View all 22 lines...

How do I script a surfaceGui textbutton to run this script when clicked on?

0
Try using Mouse.Button1Down:Connect(function() Lucasmel08 7 — 4y
0
If so You can make a script to access Replicated Storage And Then name an event And Make A script to fire the event and the event will launch the script/GUI You need for a menu to pop up DestroyerSwag101 0 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Are you trying to make a click Detector To Pull Up A remote Function Or Remote event To Fire A GUI?

Ad

Answer this question