Hello, i was making a game that has a lobby and the game itselfs.
I made the loading screen in the both.
In the lobby it works normally
But in the game
it stops.
i make a check that prints everything thats loaded and look what came up:
im wondering why this happened
my script:
local ct = game:GetService("ContentProvider")
local clone = script.Loading:Clone()
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local skibidi = true
local plr = game.Players.LocalPlayer
local chr = plr.Character or plr.CharacterAdded:Wait()
local hum = chr:FindFirstChildWhichIsA("Humanoid")
local hrp = chr:WaitForChild("HumanoidRootPart")
hrp.Anchored = true
clone.Parent = game.Players.LocalPlayer.PlayerGui
for i, v in game:GetDescendants() do
print(i)
ct:PreloadAsync({v})
end
game.ReplicatedStorage.Assets.Sounds["Strong Blizzard Snowstorm Wind Loop"]:Play()
clone.Main.MainText.Visible = false
clone.Main["Loaded!"].Visible = true
task.wait(1)
local clone1 = script.FP:Clone()
local clone2 = script.FirstPersonLock:Clone()
clone1.Parent = game.Players.LocalPlayer.Character
clone2.Parent = game.Players.LocalPlayer.Character
clone1.Enabled = true
clone2.Enabled = true
task.wait(1)
hrp.Anchored = false
ts:Create(clone.Main, ti, {Position = UDim2.new(.5,0,-1,0)}):Play()