I'm trying to make a button change the text of my TextLabel, but it's not working... :/ Does anyone know anything that could help the script?
--This is the turn on stage
function onClick(click)
local speak = game.workspace.Speakers.Sounder2.music2
local click = script.Parent.Parent.ClickSound
click:Play()
wait(1)
speak:Play()
speak.Looped = true
game.StarterGui.GUI1.TEXT1.Text=("Alarm!")
end
script.Parent.MouseClick:connect(onClick)
--This is the Turn off Stage
function onClick(click)
local speak = game.workspace.Speakers.Sounder2.music2
speak:Stop()
speak.Looped = false
local click = script.Parent.Parent.ClickSound
click:Play()
game.StarterGui.GUI1.TEXT1.Text=("Alarm Deactivated")
wait(1)
game.StarterGui.GUI1.TEXT1.Text=("System Normal")
end
script.Parent.MouseClick:connect(onClick)

6 comments
Put instead of game.StarterGui, a "game:GetService("Players").LocalPlayer.PlayerGui"
okay, i'll try that
Is this right? game:GetService("Players").LocalPlayer.PlayerGui.GUI1.TEXT1.Text=("Testing")
It does not work, but thanks for helping
What exactly isn't working? Does the text not change???
nope