How can I replace all players' avatar with a custom one?

How can I give every player a custom morph when they join the game?
Right now this is the script I’m working with (it only works when the player touches a part)


local pad = script.Parent
local characterName = "Frisk"
local character = pad.Parent:WaitForChild(characterName)
 
local debounce = true
pad.Touched:Connect(function(obj)
    local plr = game.Players:GetPlayerFromCharacter(obj.Parent)
    if plr and debounce == true then
        debounce = false
       
        pad.BrickColor = BrickColor.new("Really red")
       
        local charClone = character:Clone()
        charClone.Name = plr.Name
        plr.Character = charClone
       
        local rootPart = charClone:FindFirstChild("HumanoidRootPart") or charClone:FindFirstChild("Torso")
        local plrRoot = obj.Parent:FindFirstChild("HumanoidRootPart") or obj.Parent:FindFirstChild("Torso")
       
        if rootPart and plrRoot then
            rootPart.CFrame = plrRoot.CFrame
        end
       
        charClone.Parent = workspace
       
        wait(.5)
       
        pad.BrickColor = BrickColor.new("Lime green")
        debounce = true
    end
end)

This script ultimately destroys all localscripts that were given to the character in StarterCharacterScripts which is not good.

1 Like

I would recommend attempting to do your own research before posting a thread. Read the following article:

Creating A Custom Character (This link is no longer valid, here’s an archive of that page before it was removed.)

Here’s a video that might help How to Spawn As A CUSTOM Character in Roblox Studio (2020) - YouTube

Wow I didn’t think It’d be that simple. Thanks

1 Like