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

How do I make a clothes giver?

Asked by 8 years ago

Not a morph, but just something that changes clothes.

2 answers

Log in to vote
0
Answered by 8 years ago

Making a clothes giver should be about the same as a normal giver. When a player touches or clicks something you find the players shirt object and change it. Here is an example

local ShirtId = 1210921
game.Workspace.Giver.touched:connect(function(touched)
    if touched.Parent:FindFirstChild("Humanoid")  then
`       -- Find or create their shirt and change it.
    end
end
Ad
Log in to vote
0
Answered by
uZelt 15
8 years ago
local ShirtId = 1210920 --Subtracted 1 from the Id to make it work

game.Workspace.Giver.Touched:connect(function(touch)
if touch.Parent:FindFirstChild("Humanoid") then
touch.Parent:FindFirstChild("Shirt"):Destroy() --Removes the player's current shirt
local new = Instance.new("Shirt", touch.Parent) --Creates the new shirt
new.ShirtTemplate = "http://www.roblox.com/asset/?id="..ShirtId
end
end)

Answer this question