Making a clothing store and I'm trying to clone the shirt to a player model when they touch the brick and I don't know to id go about finishing the rest of this script
local ClothesId = 298138999 local player = game.Players.LocalPlayer function Touch() game.Players.LocalPlayer.Shirt.Clone() end script.Parent.Parent.Adornee.Touched:connect(Touch)
Don't use a LocalScript.
local ClothesId = 298138999 script.Parent.Touched:Connect(function(hit) if hit.Parent then local hum = hit.Parent:FindFirstChild("Humanoid") if hum then local shirt = hit.Parent:FindFirstChild("Shirt") if shirt then shirt.ShirtTemplate = ('http://www.roblox.com/asset/?id='..ClothesId) end end end end)
script.Parent.Touched:Connect(function(hit) * Does the same thing as *function onTouched(hit)
It then goes to see if it has a humanoid, and if it has a shirt as well and changes the shirt to the clothing id.
All you need to change for any shirt is the 'ClothesId'