Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

For some reason, it’s not letting me change a SurfaceGui’s text. Help! (Read Below) ?

If you would like to know my script, here it is.

local tempLabel = game.Workspace.TempScreen.SurfaceGui.Temp
local tempVal = game.Workspace.TempScreen.SurfaceGui.TempVal
while game.Workspace.CoreOnline.Value == true do
	wait(0.6)
	tempLabel.Text = tempVal.Value
end

Also, how do I make a click detector that also respond to mobile clicks?

Thanks!

Click detector:

Click.MouseClick:Connect(Function()
—You don’t need to know what’s inside because that’s custom—-
end)

1 comment

0

try wrapping the loop in another loop. THat way when the second loop is false, it will go to the first loop then back to the second loop, UWU

1 answer

✓ Accepted answer

Okay so the script while statement will break once game.Workspace.CoreOnline.Value isnt true anymore, so what are you going is:

local tempLabel = game.Workspace.TempScreen.SurfaceGui.Temp
local tempVal = game.Workspace.TempScreen.SurfaceGui.TempVal
while task.wait(0.6) do
	if game.Worksapce.CoreOnline.Value == true then
		tempLabel.Text = tempVal.Value
	end
end

This loops every 0.6 seconds and if CoreOnline is true then it updates the temp label text. Ok bye

1 comment

0

game.Worksapce

This discussion is preserved as it was. New answers, comments, and votes are closed.