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)

1face.FocusLost:connect(function(enterpressed)
2    if enterpressed then
3    if face.Text ~= "" and face.Text ~= " " then
4        event:FireServer(char:FindFirstChild("Head"), "ChangeFace", "rbxassetID://"..face.Text)
5        end
6    end
7end)

ServerScript

1game.ReplicatedStorage.ClothingGUI.OnServerEvent:connect(function(dp,p,et,ID)
2    if et == "ChangeFace" then
3        p.face.Texture = ID
4        p.face.Texture = p.face.Texture
5    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