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

how to make my gui wait for the character to load before fading?

Asked by
Grazer022 128
4 years ago

I’m making a loading screen but I want it to fade out when the character loads in.

local loadedDone = 200
local stillLoading = 0

what i wanna happen is whenever the character is still loading it should be from 0-199, then if the character finished loading, should reach 200 and the gui should just fade out. I can do all of that except for the waiting for the character to load thing ehehehe

how do I make this. I’m sorry if this is too much hehe. Thanks! also i use local scripts :>

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Simple, you would want to use the player.CharacterAdded function or the player.CharacterAppearanceLoaded function, an example is like below

CharacterAdded:

game.Players.PlayerAdded:Connect(function(player) --Fires when a player joins
    player.CharacterAdded:Connect(function(character) --Fires when the character is added
        --Code
    end
end

--If the ends are incorrect that is because I typed it here, not in studio. If they are I apologize.

CharacterAppearanceLoaded:

game.Players.PlayerAdded:Connect(function(player) --Fires when a player joins
    player.CharacterAppearanceLoaded:Connect(function(character) --Fires when the character's appearance is fully loaded
        --Code
    end
end

--If the ends are incorrect that is because I typed it here, not in studio. If they are I apologize.

If this helped please accept my answer!

0
but how do i make the 0-99/200 thing? I’m sorry if this is something you didn’t wanna hear :/ Grazer022 128 — 4y
Ad

Answer this question