I get this error: invalid argument #3 (string expected, got nil). These are the scripts:
Server script:
local rigs = game.Workspace.Rigs:GetChildren()
local event = game.ReplicatedStorage.RigTouched
for _, rig in pairs(rigs) do
rig.OpenGuiPart.ClickDetector.MouseClick:Connect(function(player)
local rigID = rig.ClothingID.Value
event:FireClient(player, rigID)
end)
end
Local script:
local event = game.ReplicatedStorage.RigTouched
local CurrentClothingID = script.Parent.ShopBackround.CurrentClothing
event.OnClientEvent:Connect(function(player, rigId)
script.Parent.ShopBackround.Visible = true
CurrentClothingID.Value = rigId
print(rigId)
end)
I have read the code several times but still do not understand what is the problem. The error is on line 6 of the local script.

2 comments
Try removing the "player" inside the parameters (Script) because when your firing those event roblox already knows the player so you dont need to put it
To the person above me, this is incorrect. OnClientEvent has no player argument. Only OnServerEvent has this.