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:
local dup = game.Workspace local T = .5 local size = Vector3.new (5,5,5) function REP () while true do local part = Instance.new("Part", dup) wait() part.Anchored = false part.Transparency = T part.BrickColor = BrickColor.new ('Baby blue') part.Reflectance = T part.Material = ("Glass") part.Size = size if wait == 0 then part.Anchored = false end end end REP()
How do I script a surfaceGui textbutton to run this script when clicked on?
Are you trying to make a click Detector To Pull Up A remote Function Or Remote event To Fire A GUI?