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

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

Asked by 3 years ago
Edited 3 years ago

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)

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 greatneil80 2647 — 3y

1 answer

Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
3 years ago

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

0
game.Worksapce Antelear 185 — 3y
Ad

Answer this question