GUI Face Swap Button Not Working

I made a script that changes the face of a morph by changing the decal, But it won’t work. What did I do wrong?

player = script.Parent.Parent.Parent.Parent.Parent.Parent.Character
function One()
player.Chest.Face.Decal.Texture = “http://www.roblox.com/asset/?id=8803868369
end

function onClicked()
One()
end
script.Parent.MouseButton1Click:connect(onClicked)

  • Assuming the script is local, a better way to get the local’s player character would be game.Players.LocalPlayer.Character
  • To assign an asset, the best format is: "rbxassetid://8803868369"
  • Connect should be capitalized (Connect instead of connect)

Nope, It’s a serversided fyi, I’ll try the other two solutions tho first

I have discovered the problem, it’s because it’s in a scrolling frame. I don’t know why this happens, but when its outside of it it works perfectly fine.

1 Like

Works, just needed to add a singular parent to the players to find the character properly.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.