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

When I'm using it one time, it removes the hair (?)

Asked by 3 years ago

but when I'm trying to put another hair it doesn't let me (the giver doesn't work after)

function onTouched(hit) 
    local d = hit.Parent:GetChildren() 
    for i=1, #d do 
        if (d[i].className == "Model") then 
            d[i]:remove() 
        end 
    end
end 

script.Parent.Touched:connect(onTouched) 
1
What do you want it to do exactly? The player touched a brick and the hair is removed? Than you equip other hair and it does not remove on touch? Necro_las 412 — 3y

Answer this question