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

How to disable CharacterAutoLoads, but still have GUI's appear?

Asked by 6 years ago

In a main menu I'm working on, I want the GUI's to appear, but the character to not spawn. To make the character not spawn, I'm using CharacterAutoLoads and setting this to false, however, doing this makes all the GUI's not appear. What can I do to make the GUI's still appear, but make the character not load in?

Thanks!

0
Try removing the Player's character from workspace instead of disabling CharcterAutoLoads. I don't think that GUI's can't load in without the Player's Character loading in. hellmatic 1523 — 6y

2 answers

Log in to vote
1
Answered by
BlupoV2 57
6 years ago

You have to manually copy any GUIs you want into the PlayerGui.

local Players = game:GetService("Players")
local StarterGui = game:GetService("StarterGui")

Players.PlayerAdded:Connect(function(player)
    for _, gui in pairs(StarterGui:GetChildren()) do
        gui:Clone().Parent = player:WaitForChild("PlayerGui")
    end
end)
Ad
Log in to vote
-2
Answered by
hellmatic 1523 Moderation Voter
6 years ago

Make sure your GUI's are in StarterGui.

Put this as a LocalScript in StarterPlayerScripts. It destroys/removes the Player's character when it is added into workspace.

repeat wait() until game.Players.LocalPlayer.Character
repeat wait() until game.Players.LocalPlayer.Character:IsDescendantOf(game.workspace)
wait(1 / 20)

game.Players.LocalPlayer.Character:Destroy()

Answer this question