I am making a game and theres this face which i dislike and is it possible to remove for example
a person with ninja face joins and their face turns into the default smile face when they join
the scripts parent is workspace
1 | local p = game.Players |
2 |
3 | p.PlayerAdded:Connect( function () |
4 | local char = p.LocalPlayer.Character |
5 | local wa = char.Head:FindFirstChild( "face" ) |
6 | if wa.Texture = = 11453609 then |
7 | wa.Texture = nil |
8 | end |
9 | end ) |
if theres something wrong with the code please tell me
i dont own the ninja face so i cant test it and i dont know if any of the answers will be correct
Check new Decals that may contain the faces you want to blacklist.
I would personally use table.find
to check a list out of convenience.
1 | workspace.DescendantAdded:Connect( function (FaceInstance: Decal) |
2 | if FaceInstance:IsA( "FaceInstance" ) and table.find( { |
3 | [ 1 ] = 1234567890 , |
4 | [ 2 ] = 1234567890 , |
5 | [ 3 ] = 1234567890 , -- List your face blacklist here. |
6 | } , string.match(FaceInstance.Texture, "%d+" )) then |
7 | FaceInstance.Texture = "rbxasset://textures\face.png" |
8 | end |
9 | end ) |