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

A bug with my face changing script that leave the face blank. Can it be Fixed?

Asked by 6 years ago
Edited 6 years ago

So I have a script that does this Local Script (TextBox)

face.FocusLost:connect(function(enterpressed)
    if enterpressed then
    if face.Text ~= "" and face.Text ~= " " then
        event:FireServer(char:FindFirstChild("Head"), "ChangeFace", "rbxassetID://"..face.Text)
        end
    end
end)

ServerScript

game.ReplicatedStorage.ClothingGUI.OnServerEvent:connect(function(dp,p,et,ID)
    if et == "ChangeFace" then
        p.face.Texture = ID
        p.face.Texture = p.face.Texture
    end

The script doesn't change the ID of the face because it is the wrong type of asset, it is expecting a decal, and is getting a RBX asset. The question I have is how can you change the formatting type, since when I run this script and put in a face, it simply leaves my face blank since it is the wrong format.

Answer this question