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

How do I change a surface GUI with a click detector?

Asked by 4 years ago
Edited 3 years ago

How do I change a surface GUI with a click detector? can anybody help me? I am trying to make a boss fight for a simulator: here is what I am thinking: I put a click detector in my part that is the boss when you click it there is a sign that changes its text (when you click it, it changes to "Health - <number of health>") and when you clicked the boss enough the sign changes back to its regular health and rewards you with 4000 leaderstats. here is my script so far (i have only made the when clicked change the sign to say something)

game.Workspace.Gummy.ClickDetector.MouseClick:connect(function()
    Text = ("health")
end)



--variables
Text = script.Parent.Parent.Sign.Text.SurfaceGui.TextLabel.Text

can anybody help me?

0
Please use a code block. Dovydas1118 1495 — 4y
0
what? Borkingforlife 9 — 4y
0
oh sorry Borkingforlife 9 — 3y

Answer this question