Solutions I’ve tried so far:
I haven’t really tried anything to fix it since I have no idea what to do. I tried looking for answers on YouTube, Roblox wiki, and the developer forum, but I couldn’t find any solutions for my problem.
I’m not really good at scripting so I’m not really sure on what to do. Help would be appreciated, Thanks.
If you use AlreadyPro’s plugin to load your character in Studio, it will never change since they are the actual parts and clothing that your avatar was wearing at the given time. If you want to have your game update every time you change your avatar, you should make use of GetCharacterAppearanceAsync() to load the model in yourself every time the game starts up. So an example for your ID would be:
local GirlSwag911Model = game.Players:GetCharacterAppearanceAsync(117777231)
GirlSwag911Model.Torso.CFrame = Vector3.new() --The location of your model.
GirlSwag911Model.Parent = game.Workspace
Sure! So let’s just say you wanted to place your model at position A. If you wanted to make it simple, just place a part where you want your model to be. Place it in workspace, and name it positionA. Then, your script would be:
local positionA = workspace.positionA.Position --This would store the desired location into this variable.
local model = game.Players:GetCharacterAppearanceAsync(117777231) -- Gets your Roblox avatar load-out.
model.Parent = workspace --Adds it to Workspace, which is the basically the visible world of your game.
I tried the code myself - you are right, sorry. The model is spawned but it is all out of orientation. I will try to find a way to apply all the appropriate properties to them to have it intact. As of now, I have this to anchor the parts:
local positionA = workspace.positionA
local model = game.Players:GetCharacterAppearanceAsync(117777231)
for i,v in pairs(model:GetDescendants()) do
print(v.Name)
if v:IsA("Part") or v:IsA("MeshPart") then
v.Anchored = true
end
end
model.Parent = workspace
That worked but the problem is there are still weird parts that spawn, it doesn’t have a head, and it doesn’t look like my avatar on Roblox. I appreciate the help though.
Yep sorry for not being able to help much. I am getting closer though, I found a better way to do it. If you’re free you could experiment around with this I guess. So I set up a folder and model with all the default parts:
Then when the game starts, the script would get data using GetCharacterAppearanceAsync() and add it to the model:
It seems to be going well, I think this is along the lines of what should be done. It’s not complete though, but if you have time you could try play around with it. When I’m free I’ll also try to finish it up since I’m pretty interested too.
local CharacterModel = workspace.CharacterModel
local CharacterParts = game.Players:GetCharacterAppearanceAsync(117777231)
for i,v in pairs(CharacterParts:GetDescendants()) do
print(v.Name)
if v:IsA("Part") or v:IsA("MeshPart") then
v.Anchored = true
elseif v:IsA("Accessory") then
CharacterModel.Humanoid:AddAccessory(v)
end
end
Personally I’d use the HumanoidDescription system as it’s way easier and you don’t have to worry about accessories separately to clothes, separately to packages, etc. You just need a humanoid in a blank rig and call Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(117777231))
Where 117777231 is the user ID of the player you want it to match - in this case, yours.
Oh I’m not the topic creator haha sorry - I was just trying to help but found this problem interesting so I wanted to find a way to solve it, but hopefully @GirlSwag911 will do that when she sees it. Very clear explanation by the way, thank you once again.
You could get a bit fancier, but at the absolute minimum that should solve your problem. It will apply your avatar design to the NPC model each time the game server loads to play the game.