Basically, I wanted to make a script that changes MY character’s face into the meanie face (don’t ask why lol)
This script does the steps, and prints everything. But doesn’t replace the face…
Anyways, here is the script:
local myid = 1795023834
game.Players.PlayerAdded:Connect(function(plr)
if plr.UserId == myid then
print("1")
plr.CharacterAdded:Connect(function(char)
if char.Name == "lV0rd" then
print("2")
char.Head.face:Destroy()
print("3")
local newface = script.meanie:Clone()
newface.Parent = char.Head
print("4")
end
end)
end
end)
It does print 1, 2, 3, and 4 and there are no errors.
Your code seems perfectly fine, I can think of many possibilities as to why this is seemingly not working. But I’ll start by saying, there is no reason to delete the face object and create a new one, you can just copy the Texture ID from ‘meanie’ and set char.Head.face’s value to be that.
local newfaceID = script.meanie.Texture
char.Head.face.Texture = newfaceID
Lmao welcome to game development/coding in general, it’s largely just debugging
Kinda silly but just making sure: Are you certain that the ‘meanie’ decal is actually the meanie face and not the exact same image as the face before?
This is a bit of a guess, so I might be very wrong here but try moving this code so that its called from the CharacterAppearanceLoaded event, not CharacterAdded
I think this runs when your entire character appearance has been set