Loading Screen, By Server

I’m trying to make a loading screen be enabled be the server to all players, When I enable the loading because of the animations it waits till the first players loading screen down and goes back up to move onto the next player. I want the loading screen to go up at the same time for everyone done by the server.

any help would be great, Thanks.

What does your code look like?

That sounds like you need to use task.spawn

I dont have the code for it but when ever I would need to turn on the loading screen I was call a fucntion – Something like this

local function Open_Loading_Screen (Gui : Frame)

ts:Create(Gui, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Position = UDim2.new(0, 0, 0, 0)}):Play()

wait(1)
ts:Create(Gui, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Position = UDim2.new(0, 0, -1, 0)}):Play()

end

for i, v in pairs(game.Players:GetChildren()) do

Open_Loading_Screen(v.PlayerGui.Main.Loading_Screen)

end

How could I implement task.spawn for this, I have never used it before?

1 Like
	local function Open_Loading_Screen (Gui : Frame)

		ts:Create(Gui, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Position = UDim2.new(0, 0, 0, 0)}):Play()

		wait(1)
		ts:Create(Gui, TweenInfo.new(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {Position = UDim2.new(0, 0, -1, 0)}):Play()
	end

	for i, v in pairs(game.Players:GetChildren()) do
		task.spawn(function()
			Open_Loading_Screen(v.PlayerGui.Main.Loading_Screen)
		end)
	end

thanks for the help, I’ll give it shot

1 Like