Problem with screen guis

So I have recently finished making a character selecting system whenever a player chooses a character it loads the new character but when it does that it resets all the guis that appear whenever a player resets how can i disable that when using the LoadCharacter() function from reseting all the screen uis that are enabled to resetonrespawn just when using this function, otherwise when the player resets I want the screenguis to pop again normally just not when selecting the character.

We have to know that guis for a player are running on local side.
It’s good to know that when you use LoadCharacter it won’t reset the character, so that’s a way we can use.
Let’s say, before you use LoadCharacter, you make guis don’t resetonspawn, after loadcharacter they do. Make it like:

local starterGui = game.StarterGui
local player = game.Players:FindFirstChild(player)

for i, v in pairs(starterGui:GetChildren()) do
     if v:IsA("ScreenGui") then
          v.ResetOnSpawn = false
     end
end

wait()
player:LoadCharacter()
wait()

for i, v in pairs(starterGui:GetChildren()) do
     if v:IsA("ScreenGui") then
          v.ResetOnSpawn = true
     end
end

RESET IS NOT DIE

If a player resets, it will get guis from the StarterGui, however if you make them resetOnSpawn false, they won’t reset.
After loading character they can be whatever, player won’t have the guis.

If you want to have some guis for the player when loadcharacter, make the guis, put it inside of the script, then clone and parent it to the PlayerGui inside of the Player.

Yess it’s actually perfectly working with that method thank you so much mate…Though 1 problem the camera should return to the players humanoid using a event I made it worked previously apparently it stopped when I made this change do you have any idea on why?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.