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

How would I change the Players face?

Asked by 3 years ago

I want to change the players face when they touch a part; this is the script I have:

local disableControlsRE = game:GetService("ReplicatedStorage"):FindFirstChild("DisableControls")

script.Parent.Touched:Connect(function(hit) 
    if hit.Parent:FindFirstChild("Humanoid") then

        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
        local char = hit.Parent

        char.Head.face.Texture = "https://www.roblox.com/catalog/22877700/Whistle"

        disableControlsRE:FireClient(player)

    end
end)

The script works, that's not the problem, the trouble I have is the Texture, when I touch the Part instead of changing the face, it just puts it as blank, I presume because it can't read the link. So here's my question, how can I make the link work, or if it's not possible how can I find a texture with the faces I want with a link that the game can read? Any help is appreciated

0
Asset links are formatted either: http://www.roblox.com/asset/?id=22877700 or rbxassetid://22877700 radiant_Light203 1166 — 3y
0
is there like an asset "store" like the catalog where i can browse them? WeaponisedPenguins 97 — 3y
0
An item's ID on the catalogue is the same as its asset ID. radiant_Light203 1166 — 3y
View all comments (2 more)
0
you can't browse them if you want to get the rbxassetid link, first open the develop library in roblox and then find a decal you want and click it, and the link will be like https://www.roblox.com/catalog/22877700/Whistle, just take out the number at put it in rbxassetid:// and it will be rbxassetid://22877700 WINDOWS10XPRO 438 — 3y
0
Use decals from the library. rbxassetid://430734047 (Whistle face decal found in library) ChristianTRPOC 64 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

try this

local disableControlsRE = game:GetService("ReplicatedStorage"):FindFirstChild("DisableControls")

script.Parent.Touched:Connect(function(hit) 
    if hit.Parent:FindFirstChild("Humanoid") then

        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
        local char = hit.Parent

        char.Head.face.Texture = "https://www.roblox.com/asset/?id=22877700"

        disableControlsRE:FireClient(player)

    end
end)

you can't browse them if you want to get the rbxassetid link, first open the develop library in roblox and then find a decal you want and click it, and the link will be like , just take out the number at put it in rbxassetid:// and it will be rbxassetid://22877700

if it doesn't work too dm me at discord

Blue Duck#8344

0
I've sent you a friend request on Discord, my name is LavaDoggo1845#3980 WeaponisedPenguins 97 — 3y
Ad

Answer this question