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

Putting on clothes when you click a GUI?

Asked by
dreamy67 135
11 years ago

Im trying to make a script so when you click a GUI it will put shirts and pants on your character

This is what I have right now

03button = script.Parent
04 
05button.MouseButton1Click:conect(function()
06    if hit.Parent:findFirstChild("Humanoid")then
07        char = hit.Parent
08        if char:findFirstChild("Shirt") then
09            char.Shirt.ShirtTemplate = shirtid
10        else
11            a = Instance.new("Shirt", char)
12            a.Name = "Shirt"
13            a.ShirtTemplate = shirtid
14        end
15        if char:findFirstChild("Pants") then
View all 23 lines...

2 answers

Log in to vote
0
Answered by
Sublimus 992 Moderation Voter
11 years ago

Here, I can fix it up a little bit:

01--Put this in a local script inside the textbutton
04button = script.Parent
05 
06button.MouseButton1Click:conect(function()
07    player = game.Players.LocalPlayer
08        char = player.Character
09        if char:findFirstChild("Shirt") then
10            char.Shirt.ShirtTemplate = shirtid
11        else
12            a = Instance.new("Shirt", char)
13            a.Name = "Shirt"
14            a.ShirtTemplate = shirtid
15        end
View all 23 lines...
Ad
Log in to vote
0
Answered by 11 years ago

WHy does it have to be a free model huner?

0
? Sublimus 992 — 11y

Answer this question