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

Loading Screen Won't Work: startScript re-entrancy has exceeded 3?

Asked by
Minifig77 190
9 years ago

I'm trying to make a basic loading screen for use in my various games. I whipped one up really quickly in Studio and tested it -- it worked fine. However, the place I made it in didn't have very many assets to load, so I didn't really get to see it in action very much. Therefore, I decided to copy it to one of my larger games to see it work.

I inserted the GUI and its script into ReplicatedFirst, exactly like it was in my other game. However, when I entered the new place to test it out, the GUI didn't work. I looked in the output and saw this message:

startScript re-entrancy has exceeded 3

It was followed by multiple other errors as a result of this. I figured out that the error was with the line of code that cloned the Gui to the LocalPlayer's PlayerGui. This, therefore, caused the later errors because the GUI my script was trying to change was nonexistent.

Here is my code:

game.ReplicatedFirst:RemoveDefaultLoadingScreen()
TotalItems = game:GetService("ContentProvider").RequestQueueSize
local LoadScreen = script.Parent.LoadingGui:Clone()

LoadScreen.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local ContentProvider = game:GetService("ContentProvider")

while ContentProvider.RequestQueueSize > 0 do
    if ContentProvider.RequestQueueSize ~=0 then
        LoadScreen.Frame.Container.Loader.Size = UDim2.new(ContentProvider.RequestQueueSize/TotalItems, 0, 1, 0)
    end
end
LoadScreen.Frame.Container.Loader.Size = UDim2.new(1, 0, 1, 0)
wait(1)
LoadScreen:Destroy()

Obviously, the script and its respective GUI are in ReplicatedFirst.

Why is this error happening and how can I fix it?

1
This is caused when ROBLOX tries to prevent scripts from mass-cloning themselves. If there is a script that has cloned itself, that clones that, and clones even that. Roblox picks up on this and stops it. Somehow, your script is being cloned over and over again. DigitalVeer 1473 — 9y

1 answer

Log in to vote
-1
Answered by 9 years ago

Sorry, but I personally do not know what you can do. Although, I did do some research on your error and I believe this link will help you. : http://wiki.roblox.com/index.php?title=Lua_errors I found something similar at "Unusual Error Messages"

Hope this may help.

Ad

Answer this question