Custom Character Help

hii, so basically I want make it so specific people get a custom character. I’m not a very good scripter so this is quite hard for me. I’ve tried looking on YouTube/Developer Forums and all and I can’t find a solution for this. Please let me know if you have any videos or articles relating to this, or even a script. Thank you! :sparkles:

4 Likes

You can do

local player = game.Players.LocalPlayer
player.Character = your character or npc here
5 Likes

I want it so the script will put the custom char on a specific player.

2 Likes

So, do you mean what the player is wearing?

3 Likes

i want my friend and no one else to look like this:

2 Likes

– Server Script
local playerid = whatever your friends id is
local character = the id of your character

game.Players.PlayerAdded:Connect(function(plr)
      if plr then
        if plr.UserId then
           if plr.UserId == playerid then
                 plr.CharacterApperanceId = character
                 plr:LoadCharacter()
           end
      end      
    end
end
4 Likes

Wait so, would I need to get that characters ID? for example this *https://www.roblox.com/users*/**1627549363**/profile? because I made the character in roblox studio.

2 Likes

If you made it, you may need to publish the model privately and then get the id from that.

2 Likes

ah, okay let me try.

1 Like

Do I put it in serverscriptservice? Also is it a local script or not? I’m very sorry for asking all these questions. By the way the output says " ServerScriptService.Script:13: Expected ‘)’ (to close ‘(’ at line 4), got "

1 Like

Yes, you should put it in server script service. I think I missed a bracket on my last end because it’s a function.

2 Likes

I think you could do something like this in a server script. I wrote this on phone and haven’t tested it, so I’m not sure if it works.

local Players = game:GetService("Players")

local ID = -- the userid id of your friend
local customChar = -- the character

Players.PlayerAdded:Connect(function(plr)
    if plr.UserId == ID then
        plr.CharacterAdded:Connect(function(char)
            local newChar = customChar:Clone()
            newChar.HumanoidRootPart.CFrame = char.HumanoidRootPart.CFrame
            plr.Character = newChar
            newChar.Parent = workspace
        end)
    end
end
1 Like

Is the customChar an ID?

1 Like

No, it’s the character model. For example, a character model in ServerStorage.

1 Like

So do I put the name of the model or something?

1 Like

Do you know how to make a reference to an Instance?

1 Like

I’m not very good at scripting so that would be a no.

1 Like

Where is the character model stored?

1 Like

You would put the model into server storage. Also, change modelname to what ever the model’s name is.

local customChar = game:GetService("ServerStorage"):WaitForChild("modelname")

ServerStorage.