Loading...

Face remover | Forum

fantasma
fantasma Jul 12

4 Posts

yo, it's me, fantasma
been trying to fix this face remover in my game for so long, any clue why it doesn't work?



fantasma
fantasma Jul 12

4 Posts

debounce = true


function onTouched(hit)

    if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then

        debounce = false

        

        script.Parent.BrickColor = BrickColor.new("Bright red")


        pcall(function()

            local character = hit.Parent

            local head = character:FindFirstChild("Head")


            if head then

                local face = head:FindFirstChild("face")


                if face then

                    face:Destroy()

                end

            end

        end)


        wait(1)


        script.Parent.BrickColor = BrickColor.new("Dark green")


        wait(1)

        debounce = true

    end

end


script.Parent.Touched:connect(onTouched)

The Forum post is edited by fantasma Jul 12