✓ Accepted answer
This is not exactly how you would get a custom character.
what you need to do is set the character to the custom character.
Put the script in a localscript inside starterplayer.
wait(1)
local player
while not player do
wait()
player = game:GetService('Players').LocalPlayer
end
function onSpawn()
local char = game.ReplicatedStorage["ModelName"]:Clone()
char.Parent = workspace
char.Name = player.Name
local prevChar = player.Character
wait()
player.Character = char
prevChar:Destroy()
if char:FindFirstChild("Humanoid") then
char.Humanoid:Destroy()
end
local human = Instance.new("Humanoid", char)
char.Archivable = false
human.Died:connect(function()
wait(1)
onSpawn()
end)
end
onSpawn()
That is all you need to do! but make sure you have already jointed every part of the character and have a head and torso and humanoid root part object!
if this helped please accept ~KIheros :)
3 comments
Hey, Thanks this is great :D, anyway to make it a module so it can be accessed through another "main game" script?
Maybe, not great at modules. :(
Thats alright :D