I've looked for 2 hours now and just keep finding the same answer over and over. But the problem is, the answer doesn't work for me.
I'm trying to make a script that changes a player's face when they put in an id. I've looked up YouTube tutorials, looked at other answers on questions, but none of it has helped me. I do it the same as YouTube and yet it still doesn't work. Unless it has to go in a LocalScript (Which I don't think so, but I'm not certain) I have no idea. Help is very much appreciated.
ServerScript:
game.ReplicatedStorage.Appearance.OnServerEvent:Connect(function(plr, key)
local Char = game.Workspace:FindFirstChild(plr.Name)
local newTexture = "rbxassetid://" .. key
Char.Head.face.Texture = newTexture
end)
LocalScript:
script.Parent.FocusLost:Connect(function(enterPressed)
if enterPressed then
game.ReplicatedStorage.Appearance:FireServer(script.Parent.Text)
end
end)

6 comments
Also, there's no output when it runs.
how are you getting the key?
When the LocalScript fires the RemoteEvent it's sending the script.Parent.Text to the ServerScript, which in this case is the id that the player put in.
Where did you put the serverscript? (i recommend to put it in ServerScriptService.)
What is "FocusLost"? If it is a value object then I suggest that the problem may be that you are entering the object and not the Value inside it.
FocusLost refers to when someone stops typing in the TextBox, i.e. When the flashing bar goes away. The ServerScript is already in ServerScriptService and the LocalScript is in the TextBox in the PlayerGui. Sorry, I should've explained these things in the question.