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)
I'm gonna rewrite my whole thing.
First of all, I will publish a formatted version at bbzlazer.github.io/friends-hangout
DesiredToResign, here are the top five reasons why your game isn't working.
How to fix: I can't fix this problem, cause I don't know which models you want to keep or not. It's only a problem when you use too much. I could tell from the camera zoom glitching.
How to fix: It's easy to place. Make and name folders accordingly and put your models/parts into each folder. I could do that for you, but it's helpful when you do it yourself
This should work, make this whole script a local script
--This is the turn on stage local plr = game.Players.LocalPlayer function onClick(click) local speak = workspace.Speakers.Sounder2.music2 local click = script.Parent.Parent.ClickSound click:Play() wait(1) speak:Play() speak.Looped = true plr.PlayerGui.GUI1.TEXT1.Text=("Alarm!") end script.Parent.MouseClick:Connect(onClick) --This is the Turn off Stage local plr = game.Players.LocalPlayer function onClick(click) local speak = game.workspace.Speakers.Sounder2.music2 speak:Stop() speak.Looped = false local click = script.Parent.Parent.ClickSound click:Play() plr.PlayerGui.GUI1.TEXT1.Text=("Alarm Deactivated") wait(1) plr.PlayerGui.GUI1.TEXT1.Text=("System Normal") end script.Parent.MouseClick:Connect(onClick)