Okay so I am making a vest by welding it through scripting so when they touch a part it welds, but now I want it to automatically weld it when they first join the game and they can only get it once. I have tried to use a PlayerAdded function but it didn't work. here is my code [ `
function onTouched(hit)
if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent:findFirstChild("[Vest") == nil then
local g = script.Parent.Parent["Vest"]:clone()
g.Parent = hit.Parent
local Y = Instance.new("Weld")
Y.Part0 = hit.Parent.Torso
Y.Part1 = g.Middle
g.Middle.Anchored = false
Y.Parent = hit.Parent.Torso
end
end
script.Parent.Touched:connect(onTouched)
`]
Help?
