Trying to make text appear on a screen when I press a button, but it isn’t working. This script shows the code I’m using.
function OnClicked()
if script.Parent.Sound.IsPlaying == false then
script.Parent.Sound:Play()
else
script.Parent.Sound:Stop()
end
local ResponseTime = workspace:WaitForChild("ResponseTimeScreen").Screen.SurfaceGui.ResponseValue
if not ResponseTime.Text == "HEIGHTENED" then
ResponseTime.Text = "HEIGHTENED"
end
end
script.Parent.ClickDetector.MouseClick:connect(OnClicked)