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

The screens won't stop changing when the value is off, what am I missing?

Asked by 5 years ago

Alright so I posted here earlier today about my game was spiking for ten seconds when I tried to play these trons... with this, I was able to get help and get it fixed but now I can't get it to stop... I want to avoid using while true do at all costs. I feel like this will seem like a stupid question but I sat down and took the time to write a new script that was my own with what I was told to do. At least it's now my own script. The only true

Screen1 = game.Workspace.Screen1
Power = script.Parent.Power
--Made By MillerrIAm
--Helpers Liliardio & WeArefSociety
--------------------------------------------------------------------
--Start Script
Power.Changed:Connect(function(Power2)
    if Power2 then
            while wait() do
                Screen1.Decal.Texture = "http://www.roblox.com/asset/?id=665256981"
                wait(0.1)
                Screen1.Decal.Texture = "http://www.roblox.com/asset/?id=665257289"
                wait(0.1)
                Screen1.Decal.Texture = "http://www.roblox.com/asset/?id=665257768"
                wait(0.1)
        end
    end
end)

Thank you in advance for the comments, answers & help!

0
FYI, even with me writing the script from scratch.. i basically duplicated it with some shortened parts.. Just2Terrify 566 — 5y
0
Show us a line of code where you run the function and the problem occurs. Jexpler 63 — 5y
0
No errors, that's the issue. It shows nothing for me. I've checked the output multiple times, nothing wrong happens. It just plays but never stops which is why i came here. Just2Terrify 566 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

You can check if Power.Value is true in the while loop. When it becomes false, the loop will stop.

while Power.Value do

end
0
It was that simple..... i feel like a idiot. Thank you so much! Just2Terrify 566 — 5y
Ad

Answer this question