Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how change your face to a decal with a tool?

Asked by 6 years ago

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

Log in to vote
0
Answered by 6 years ago

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.

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 Jellal27 0 — 6y
0
That’s very strange... Florian27 76 — 6y
Ad

Answer this question