Well judging by the property name, the thing is that this would also disable Mesh Heads & Accessories as well so it would affect it, probably not the best alternative
Thereās no description for Workspace.MeshPartHeadsAndAccessories, therefore, it doesnāt determine the side effects of disabling it. However, from my research, it intends to disable certain accessories from MeshPart, and different heads - causing an arising issue with hats. Itās advised to enable it back if you donāt wish for that to happen.
Couldnāt you try:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local decal = char:WaitForChild("Head"):WaitForChild("face")
decal:Destroy()
end)
end)
or instead of decal:Destroy()
, change the property of it (transparency, decal id)?
Did you test that only on studio or on a live game too? Because I think it would work on a published game. The reason it doesnt work on studio is because your player loads before the script runs, so the PlayerAdded doesnt fire. Also donāt use this loop (repeat wait() until head ~= nil), because WaitForChild already yields the code.
Update*: I tested here about 10 times and it did worked every single try.
Iām presuming the issue with the previous script was that the loop was running prior to the decal actually loading in, therefore it wasnāt detected. I just tested this script and it works perfectly fine, so Iād recommend trying to test it if you donāt want issues when disabling the other property:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function()
local head = plr.Character:WaitForChild("Head")
local face = head:WaitForChild("face")
face:Destroy()
end)
end)
use this:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
repeat
wait()
until char:FindFirstChild("Head") and char.Head:FindFirstChild("face")
char.Head.face:Destroy()
end)
end)
This code does not seem to work, but thanks for the input!
also yes iāve already tried changing transparency but it doesnāt work
Well im not sure if my studios is broken or something, but i tested it in a new world and put it under ServerScriptServiceand it did not work,
But i really appreciate the help!
Did you test if it worked after resetting? Itās happened to me several times where the character loads before the CharacterAdded
event fires.
In that case you just do
local function on_character_added(character: Model)
-- code to destroy decal
end
Players.PlayerAdded:Connect(function(player: Player)
if player.Character then
on_character_added(player.Character)
end
player.CharacterAdded:Connect(on_character_added)
end)
The world im using is published and i also deleted the loop you told me to delete, but it still did not work
but thanks for the advice!
Ok iāll go try that, maybe my studios is glitched lol
edit: it did not work for some reason
Thatās the thing though, if you look earlier on the posts we did some debugging & it does print out everything thatās inside the Character
's Head, but it still isnāt removing it
wait guys i think i found a soloution here
Try head:FindFirstChildOfClass("Decal"):Destroy()
Try this?:
script.Parent.Head:WaitForChild("face"):Destroy()
Place it in StarterCharacterScripts.
THIS WORKS!!!
Thanks you alot for helping me out with this issue
So after several hours and a bunch of replies I finally found the solution provided by @Kaid3n22 as shown in the code below
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
repeat
wait()
until char:FindFirstChild("Head") and char.Head:FindFirstChild("face")
char.Head.face:Destroy()
end)
end)
but I would like to thank each and every single one of you guys for helping me
I would especially like to thank:
@JackscarIitt
@robloxguy9093ALT
@Legend_boysYTs
@Doqee
@Dfzoz
@walshuk
@sjr04
@camomileex0
@SOTR654
for taking time out of there day to help me, I appreciate it alot!