Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Kick Player on avatar hair?

Hi, I am trying to make a game where if a bacon hair joins, he will get kicked. Meaning, the game won't have any bacon hairs. To do this, I was thinking of some way to detect the bacon hair and then kicking the player. I don't know if this is possible or how to do this. I have like only 5% knowledge about writing in lua. Is there someone out there that could make this? Is it even possible???

I would like the code to detect the bacon hair, then kick the player.

Thanks anyway. This forum helped me out a lot already.

~Xtensive

2 comments

0

Please make an attempt at this before reauesting for help here. This is not a request site.

0

Why would you wanna make a pal hair be kicked? and this is not a request site.

1 answer

game.Players.PlayerAdded:Connect(function(plr)
        local chr = plr.Character or plr.CharacterAdded:Wait()
        if chr:FindFirstChild("Bacon Hair") then
              chr:FindFirstChild("Bacon Hair"):Destroy()
       end
end)

Note:You would have to find the name of the hair cause i dont know it. Something like this should do. I dont think it has to have any specific location.(in the game)

2 comments

0

to kick the player you would have to do plr:Kick()

0

its PalHair

This discussion is preserved as it was. New answers, comments, and votes are closed.