Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How to change a Players Look to a models look?

Asked by 9 years ago

Its like trying to change the char to a models char can anyone help?

0
You mean like a morph? TurboFusion 1821 — 9y
0
Yeah digitalzer3 123 — 9y

2 answers

Log in to vote
2
Answered by 9 years ago

Some things you could do:

  • Delete all the Shirts, Pants, etc.
  • Add shirts and etc.

Deleting

There is a function called ClearCharacterAppearance(). You know, it clears the character's shirts, pants, hats, even packages.

game:GetService("Players").LocalPlayer:ClearCharacterAppearance()

Adding stuff

local plyr = game:GetService("Players").LocalPlayer

function add()
    local s,p,h,t = Instance.new("Shirt", plyr.Character),Instance.new("Pants", plyr.Character),Instance.new("Hat", plyr.Character),Instance.new("ShirtGraphic", plyr.Character)
    s.Texture = "AssetHere"
    p.Texture = "AssetHere"
    --Edit hat
    t.Texture = "AssetHere"
    --s is shirt, p is pants, t is t-shirt
end


Hope it helps!

0
I tried this script since it looked cool, but it didn't work for some reason. It didn't like clear my appearance. Instead, it looked like what I was wearing. Does the LocalScript go on Workspace and is it supposed to work on servers instead of Play Solo? RobotChitti 167 — 9y
0
It's a LocalScript, hence the LocalPlayer at the beginning. drew1017 330 — 9y
Ad
Log in to vote
7
Answered by 9 years ago

Let's try something simple. We'll give them a specific shirt.

First thing, we need to get a shirt and place it inside a part (the same part your morph block is) and name it 'shirt'. Put a script inside the same part:

local shirt=script.Parent.shirt
function touch(hit)
if game.Players:findFirstChild(hit.Parent.Name) then
stuff=hit.Parent:GetChildren()
for i=1, #stuff do
if stuff[i].ClassName=="Shirt" then --remove existing shirts
stuff[i]:Destroy()
end
shirt:Clone().Parent=hit.Parent
end
end

This script isn't tested, but I hope it works.

-ds

Answer this question