Alright so i’m making a party invitation system for my game
-The problem is that when I use OnClientEvent, every parameter is nil.
The scripts that fires:
script.Parent.OnServerEvent:Connect(function(player,v,mod,)
local modr = require(mod)
print(player)--this part works, yet the onclientevent doesn't?
modr:SendInvite(v,player)-- V is the player to send the invite to and player is the person that sent the invite.
end)
the OnClientEvent script
game.ReplicatedStorage.InviteToParty.OnClientEvent:Connect(function(player)
print("invite recieved from "..player)-- I get an error: attempt to concantenate string with nil
end)
First of all you should do player.Name instead of player if you’re trying to print the player’s name because player is not a string, but it’s an instance. You cannot print it as a string.