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.

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

Adding stuff

01local plyr = game:GetService("Players").LocalPlayer
02 
03function add()
04    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)
05    s.Texture = "AssetHere"
06    p.Texture = "AssetHere"
07    --Edit hat
08    t.Texture = "AssetHere"
09    --s is shirt, p is pants, t is t-shirt
10end


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:

01local shirt=script.Parent.shirt
02function touch(hit)
03if game.Players:findFirstChild(hit.Parent.Name) then
04stuff=hit.Parent:GetChildren()
05for i=1, #stuff do
06if stuff[i].ClassName=="Shirt" then --remove existing shirts
07stuff[i]:Destroy()
08end
09shirt:Clone().Parent=hit.Parent
10end
11end

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

-ds

Answer this question