Why Isnt module taking player parameter from onserverevent?

serverscript-

MoveEvent.OnServerEvent:Connect(function(p, chessModel, Piece, Square)
	print(p, chessModel, Piece, Square)
	ChessModule.MoveEventHandler(p, chessModel, Piece, Square)
end)

module script-

function ChessModule:MoveEventHandler(Player, ChessModel, Piece, Square)
	print(Player, ChessModel, Piece, Square)
end

image

You are using one dot instead of a colon when calling the MoveEventHandler function which automatically sets the player instance to self and causes this to happen.

1 Like

im Stupid i didnt see that thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.