How to use Player:LoadCharacter() in a local script in Starter GUI?

Hey how are you hopefully you’re good, so today I have a question. I want to know how it’s possible to use
Player:LoadCharacter() in a local script in StarterGUI for a button I have?
I have tried a way to solve this by using Remote Events but that didn’t work for me so I’ve come here to ask how to do it any help would be appreciated thank you for your time to read this! :slight_smile:

1 Like

Hi, from what I know it is not possible to use Player:LoadCharacter() in a local script, so you can use a remote event and do it from the server.


Look I used this script in ReplicatedStorage to connect a function to the event is the script correct:

local LoadChar = game.ReplicatedStorage:WaitForChild(“LoadChar”)

local function onRemEvent_LoadChar(Player)



Yes, that is correct. The code seems to be fine.

The script should be in ServerScriptService.

Thats the code in my button is it correct?

local Player = script.Parent.Parent.Parent

local Button = script.Parent.Frame.GloveDeku

local Characters = game.ReplicatedStorage.Characters

local LoadChar = game.ReplicatedStorage.LoadChar



script.Parent.Enabled = false

game.ReplicatedStorage.Characters.GloveDeku.Name = "StarterCharacter"

game.ReplicatedStorage.Characters.StarterCharacter.Parent = game.StarterPlayer



Wait really I thought it was supposed to be in replicated storage

the remoteevent goes in the replicatedstorage but the script goes in ServerScriptService

also when doing code use ``` before and after

Oh i see thanks man so ill put the script in server script service and ill see if it works

1 Like

That’s very easy, first you can’t do LoadCharacter in Local Script so you got to do that:

Local script

local Players = game:GetService("Players")
local Player = Players.LocalPlayer

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Remote_Event = ReplicatedStorage:FindFirstChild("Character Load")


In Server Script you got to use this… Place this in ServerScriptServices:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Remote_Event = ReplicatedStorage:FindFirstChild("Character Load")


Ok but your forgot to connect the function and remote event in the server server script service

They did not.



works as well as

local function func(plr)


1 Like

But it didnt really work since I have a character selection ui and I want it to go not visible when the button is pressed and I want it to load a new character but that restarts the program and then the ui will be visible again how do i fix that

Let me get this straight, so when you do Player:LoadCharacter it made the UIs reset?

I think set ResetOnSpawn = false

yes everything resets ui and like the whole game so idk how to fix that with a variable?

Set it to false Screen Shot 2021-07-13 at 3.12.01 am

or maybe in the Player:LoadCharacter() do that


In what object is that property?

Screen Shot 2021-07-13 at 3.18.42 am Screen Gui

Ok now that thats fixed theres one more problem its that the actual avatar of the character is overriding the StarterChracter