Ok so i was using this script below in serverScriptService to remove the default face from my character. Strangely it was working before but now its not for some odd reason, I tested the same script on a new fresh world and it was still not working. Any alternatives or solutions? Thanks!
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local head = character:WaitForChild("Head")
repeat wait() until head ~= nil
repeat wait() until head:FindFirstChildWhichIsA("Decal") ~= nil
head:FindFirstChildWhichIsA("Decal"):Destroy()
end)
end)
2 Likes
The default face in a Head is just named “face” so I think you can just do:
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local head = character:WaitForChild(“Head”)
head.face:Destroy()
1 Like
nope , tried it, does not work,
Not sure why you’re using repeat wait()
, especially considering you’re calling WaitForChild()
which would yield the code until a Head
has been found
Perhaps try this?
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local Head = Character:WaitForChild("Head")
local Face = Head:WaitForChild("face")
Face:Destroy()
end)
end)
2 Likes
thanks for helping but unfortunately it seems like this face does not want to go away for some reason. I’ve tried so many alternatives, but to no avail there not working
Hm, 1 potential alternate you could try is looping through the Head’s Children perhaps? Try this and check what Outputs back:
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
print("Character added")
local Head = Character:WaitForChild("Head")
for _, Object in pairs(Head:GetChildren()) do
print(Object)
if Object.Name == "face" then
print("I swear if this doesn't work I'm gonna yeet my PC")
Object:Destroy()
end
end
end)
end)
1 Like
Well i tried it and still does not work. but here’s the output
The last thing it printed was OrginalSize
1 Like
Could you try again? I edited the script a bit (I’m unsure if I could be using the wrong Class Object)
1 Like
game.Players.PlayerAdded:Connect(function(plr)
if plr then
for i,v in pairs(plr.Character.Head:GetChildren()) do
local stuff = v:FindFirstChildWhichIsA("Decal")
if stuff then
stuff:Destroy()
end
end
end
end)
1 Like
The only things with your script, is that it’ll only fire once which would not account if the Character gets re-added into the workspace
Also your face
variable could return back as a nil
value, so you’d have to sanity-check it to prevent an error from occurring
3 Likes
WHY wont this face just go away lol . It didn’t work even after trying the modified version
here’s the output though
but i guess im gonna have to go yeet my PC then
WOT, that print statement should’ve worked though? How is it not working?
1 Like
Exactly my question lol. Did Roblox change anything regarding Avatar’s recently?
heres a video showing that its not working
Hm, when you start up a simulation can you check your Character’s Model, and what’s supposed to be inside the Head?
Also could you try resetting if anything changes?
1 Like
One time I went to “drafts” and committed all the scripts and my script was working for some reason.
Maybe you should try that.
1 Like
Should we do that? because this is a fresh new world i made just for this problem, and my character is the default r15 rig. So i don’t think theirs anything interfering.
You could just go into the Explorer to view everything what’s currently in the workspace, then find where your Character Model is & expand the page from there
@robloxguy9093ALT Thing is, the print statements outputted back so I don’t think that would be the case
1 Like
uhhh i think i fixed it, maybe, could you verify if this is a valid way to do this
one sec i’ll post what i did
Ok so what i did was disable this property of the workshop
and it works
But is it ok if i do this like will it affect anything else?