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!
You can do
local player = game.Players.LocalPlayer
player.Character = your character or npc here
I want it so the script will put the custom char on a specific player.
So, do you mean what the player is wearing?
– 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
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.
If you made it, you may need to publish the model privately and then get the id from that.
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 "
Yes, you should put it in server script service. I think I missed a bracket on my last end because it’s a function.
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
No, it’s the character model. For example, a character model in ServerStorage.
So do I put the name of the model or something?
Do you know how to make a reference to an Instance?
I’m not very good at scripting so that would be a no.
Where is the character model stored?
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.