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

Kick Player on avatar hair? [closed]

Asked by 4 years ago

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

0
Please make an attempt at this before reauesting for help here. This is not a request site. IAmNotTheReal_MePipe 418 — 4y
0
Why would you wanna make a pal hair be kicked? and this is not a request site. JAX_AtRB -1 — 4y

Closed as Not Constructive by IAmNotTheReal_MePipe, CreationNation1, imKirda, yuni_Boy1234, and Cynical_Innovation

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
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)

0
to kick the player you would have to do plr:Kick() SitaruDaniel 44 — 4y
0
its PalHair CrazyCats84 154 — 4y
Ad