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

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

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!

3 comments

0

FYI, even with me writing the script from scratch.. i basically duplicated it with some shortened parts..

0

Show us a line of code where you run the function and the problem occurs.

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.

1 answer

✓ Accepted answer

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

1 comment

0

It was that simple..... i feel like a idiot. Thank you so much!

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