Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how change your face to a decal with a tool?

here is my script so far (sorry kind of a noob)

sp = script.Parent function onEquipped(mouse) local Player = game:GetService("Players").LocalPlayer game.Workspace.Player.Head.face.Texture=1296295817

1 answer

A function in a function would be appropriate for this, I prefer it this way (Make sure it's a LocalScript since you are getting MouseClicks from an individual Player).

local Tool = script.Parent --make sure this is a Tool object
 
Tool.Equipped:connect(function(Mouse) --Tool equipped function
	Mouse.Button1Down:connect(function() --Button1Down is an Event for whenever the right mouse is clicked
	local Player = game:GetService("Players").LocalPlayer.Character --Character is a part of LocalPlayer, it is the player in the server where the player has shirts and pants etc.
	Player.Head.Face.Texture = 1296295817 --texture id, make sure Player.Head.Face.Texture is correct or the code will fail
	end)
end)

If it works please accept this as an answer :) I did not check the last part (Player.Head.Face.Texture) so make sure it is correct. To make sure it is correct press Play Solo, go to Workspace and find your character with your username (it will be a model), Click on head and see if there is Face.Texture inside it.

2 comments

0

i tried your script it doesnt seem to be working i have the decals asset id right but the face will not change and it is in a local script i have checked the output and there are no errors

0

That’s very strange...

This discussion is preserved as it was. New answers, comments, and votes are closed.