Yesterday I encountered something I never had before. My scripts started to randomly just break and some parts not function at all.
Great example is my static script, not moved, not changed, yet it has just randomly stopped working.
Worked just fine but then out of nowhere it just doesn’t. The
.Visible just doesn’t fire at all, and when I try to debug it with
print() it prints. And I can change the visiblity of the ImageFrames through the command bar and it work just fine. And no, the output is emptyyyy, quite literally nothing.
I had a theory that this might be due to too many
while do loops. Would that be the problem?
Any help greatly helps, thank you.
While yes, you while loop usage is awful, they shouldn’t affect other parts of code except for yielding. Try wrapping them in task.spawn
Just tried, Didn’t work ////////////////
Oh my goddd nevermind I’m stupid, I just realised that my Loading script is on the client and this script is on the server
However, it still doesn’t really explain the static. It just doesn’t work still
What’s the static supposed to to do?
In a loop, the script makes all the static ImageFrames invisible, but makes on visible
The code for reference:
It worked just fine yesterday but then the “bug” started appearing and now it just doesn’t
Fixed it somehow.
Okay so for the people that possibly find this post, make sure if you make a frame invisible on the client, then make it visible on the client too because crossing between server and client apparently isn’t the best idea
Also thanks to @Mystxry12 for attempted help
Seems like a bad way to go about things tbh:
local children = script.Parent.Static:GetChildren()
while true do
local rng = math.random(#children)
for index, child in children do
child.Visible = index == rng
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.