Help with changing a face

I am trying to change the face of someone but keep getting the same error:
image

--Local Script
local player = " "
script.Parent.Activated:Connect(function(player)
	player = game.Players.LocalPlayer
	local playername = game.Players.LocalPlayer.Name
	local image = "https://www.roblox.com/catalog/6288973652/Images-kat9-1"
	game.ReplicatedStorage.RemoteEvent:FireServer(player, image)
end)
-- Server Script
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, image)
-- The line that gets the error:
	player.Character.Head.face.Texture = image
end)
1 Like

Don’t send the player argument from the client, it’s automatically passed to the servers in RemoteEvents and RemoteFunctions as the first argument.
ex.

-- LocalScript
remoteEvent:FireServer()
-- ServerScript
remoteEvent.OnServerEvent:Connect(function(player)
    print(player) -- would print the player who fired the event's name
end)

On local script dont pass in player thats the issue. When you pass in player through local script its setting image to player.

Don’t put plr when using fireserver. Fixed code:

    --Local Script
    local player = " "
    script.Parent.Activated:Connect(function(player)
    	player = game.Players.LocalPlayer
    	local playername = game.Players.LocalPlayer.Name
    	local image = "https://www.roblox.com/catalog/6288973652/Images-kat9-1"
    	game.ReplicatedStorage.RemoteEvent:FireServer(image)
    end)
    -- Server Script
    game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, image)
    -- The line that gets the error:
    	player.Character.Head.face.Texture = image
    end)

there you go that should work.