game.ReplicatedStorage.equipSword.OnServerEvent:Connect(function(player, sword)
player.equippedSword.Value = sword
end)
client/gui code
script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage.equipSword:FireServer(game.Players.LocalPlayer, "Biograft")
end)
When I fire the event in the gui while playing in studio this error pops up in the output,
invalid argument #2 (string expected got instance)
The sword is a string and it's supposed to change the player's equipped sword value to Biograft sword so that in the round they spawn with that sword. Any ideas on how to fix it?

11 comments
You don't have to put the define local player for argument 1 while firing the event
If that's not the case then can you provide the whole code for it?
This is pretty much all the code for it. Or at least the one I think isn't working. I'm pretty sure that if you remove the player part it will fire for everybody in the server if I'm correct.
Plus if I remove the player argument what player will be requesting to equip it. That would just do it for all players, which is not what I want.
Please put in the client-side code where the FireServer function is ran.
Okay!
Done. I edited the post.
Simple error just says it wants a string instead of a instance. a string looks like this "Lol" or 'Lol'
Also where does the error happen? it will tell you what line the error occurred in the output or simply just click the error and it will show you the line
I think it's because it passed the line
hmmmm i know what a string is i just dont know how to pass one in a remote event.