Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how i can change StarterCharacter/Player Character while ingame?

guys, how do i can change the StarterCharacter while ingame? like, if player change his race, i want change his Character too, so ill change the starter character to this new one, how i can do this? or if u guys know some way to change the player Character without needing change the starter Char too, i prefer. and i already have all the script of "race.Changed" and i already made a script setting StarterChar when player join, i just need remake this "Character Changer" script. this is my full script just for doubt:

local W = game:GetService("Workspace")
local SS = game:GetService("ServerStorage")
local RS = game:GetService("ReplicatedStorage")
local SP = game:GetService("StarterPlayer")

game.Players.PlayerAdded:Connect(function(plr)

	plr.CharacterAppearanceLoaded:Connect(function(char)
		local stats = plr:FindFirstChild("Stats")
		local race = stats:WaitForChild("Race")
		
		local hollow = SS.Adjuchas
		local gillian = SS.Gillian
		local adjuchas = SS.Adjuchas

		if race.Value == "hollow" then
			plr.Character = hollow
			local newChar = hollow:Clone()
			newChar.Name = ("StarterCharacter")
			newChar.Parent = SP
			newChar.PrimaryPart = newChar.HumanoidRootPart
			wait()
			plr:LoadCharacter(newChar)
		end
		if race.Value == "gillian" then
			plr.Character = gillian
			local newChar = gillian:Clone()
			newChar.Name = ("StarterCharacter")
			newChar.Parent = SP
			newChar.PrimaryPart = newChar.HumanoidRootPart
			wait()
			plr:LoadCharacter(newChar)
			
		end --
		if race.Value == "adjuchas" then
			plr.Character = adjuchas
			local newChar = adjuchas:Clone()
			newChar.Name = ("StarterCharacter")
			newChar.Parent = SP
			newChar.PrimaryPart = newChar.HumanoidRootPart
			wait()
			plr:LoadCharacter(newChar)
		end --
		race.Changed:Connect(function()
			if race.Value == "gillian" then
				plr.Character = gillian
				local newChar = gillian:Clone()
				newChar.Name = ("StarterCharacter")
				newChar.Parent = SP
				newChar.PrimaryPart = newChar.HumanoidRootPart
				wait()
				plr:LoadCharacter(newChar)
		end --
		
		if race.Value == "adjuchas" then
				plr.Character = adjuchas
				local newChar = adjuchas:Clone()
				newChar.Name = ("StarterCharacter")
				newChar.Parent = SP
				newChar.PrimaryPart = newChar.HumanoidRootPart
				wait()
				plr:LoadCharacter(newChar)
		end --
		end)
	end)
end)

1 answer

You cant change the starter character during game, if you want to edit something, the best bet is to put a script in starter character and then the script changes what you want to happen. Starter character are scripts put into the character model when they join the game. it doesn't put it in any other time even if the folder is changed.

This discussion is preserved as it was. New answers, comments, and votes are closed.