AvatarContextMenu not working

But what you could do is make a seperate local script and disable it once it reaches the end right.

Isn’t that overcomplicating a simple task that could be done once, with one script without having a script constantly spawning inside the character even if its disabled?

Sounds more like “patching” doing that “disable” of the script, instead of using a simple approach of adding the constant pcall retries on a single script that will last entire gameSession.

1 Like

Oh yeah just realised it’ll just run again even if you disabled it, but can’t you check if it has already ran in some way. Like maybe make a module script with like an attempt number and if it’s already equal to 1 then disable the script.

local ms = require(game.ReplicatedStorage:WaitForChild("Ms")
if ms.number == 1 then
script.Enabled = false
else
-- Do the stuff you know.
end

Also I’m sure just cloning a script doesn’t affect resources that much right? Especially a disabled one that runs like 2-3 lines of code?

It’s like wanting to build a whole dam to contain the water, when you could simply turn off the faucet. Overcomplicating things doesn’t sound like a good approach to me.

Well I mean that scenario is kinda different, like it’s just one module and 2 lines of code. Plus it has a pretty good benefit, being more likely to load rather than needing a while loop to retry.

pcall tries, not able, do retry, pcall tries, not able, do retry, pcall tries, succeed, break.

I dont see the “while loop”, that scares many devs. It can be done with or without using “while” and, still a good way to verify important stuff as loading of DSS or saving, and lot of stuff. The comparison saying a that finding ways that it should work since the first time in order to VS not doing retries, seems nonsense, specially if you can’t be 100% that your approach will get the results on the first try, and only based on a few tests seems like 100%, but highly doubtful on long term

Yeah I know you don’t need to use a while loop, that is why I was against Abi’s idea. He used a while loop if it didn’t succeed, because I thought pcalls automatically retry if they fail.

Well, it’s never failed even once on startercharacterscripts the amount of times I’ve done so, so I don’t think it actually does fail ever. But pcall sure just in case.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.