I have a loading screen script that clones a Gui with a script inside to PlayerGui, the Gui script is only supposed to run once but for some reason it either runs twice or three times.
Load script:
game.ReplicatedFirst:RemoveDefaultLoadingScreen() local playerGui = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui") local LS = script.LoadScreen:Clone() LS.Parent = playerGui -- Load proccess -- if not game:IsLoaded() then game.Loaded:Wait() end wait(3) LS:Destroy() local Main = script.Main:Clone() Main.Parent = playerGui script.Loaded.Value = true
Gui Script:
print(“Test”)
Results:
I only want the Gui script to print Test once, any ideas what’s going on?