How can I fix the error “Player Argument must be a Player Object”?
Here’s the code written in a Script
local changepartcolorevent = game.ReplicatedStorage:WaitForChild("ChangePartColor")
local part = script.Parent
part.Touched:Connect(function(hit)
changepartcolorevent:FireClient()
end)
This is not a serious code. I’m just practicing Remote Events.
You need to specify a client in FireClient() - This would be a player object.
For simplicity in your test, I recommend using FireAllClients(), so all clients recieve the event.
This would be the LocalPlayer, however this cannot be accessed from the server. For testing, you can set player to be game.Players.YOUR USERNAME
It needs to be a player and not a character though.