This has been flipping me for hours.

On Replicated Storage: LoadingScreenMarkAsReadyEvent [RemoteEvent]

On Local Script:

local LoadingScreenMarkAsReadyEvent = game.ReplicatedStorage:WaitForChild('LoadingScreenMarkAsReadyEvent)

local Team1 = {}
local Team2 = {}
local teamName = "Red"
local player = game.Players.LocalPlayer

print(player.Name) --/Comment1
	print(teamName) --/Comment2
	print(teamName .. " ") --/Comment3

LoadingScreenMarkAsReadyEvent:FireServer(player, teamName, Team1, Team2)

Comment1: Consteleo

Comment2: Red

Comment3: Red

On Server Script:

local LoadingScreenMarkAsReadyEvent = game.ReplicatedStorage:WaitForChild('LoadingScreenMarkAsReadyEvent)

local function LoadingScreenMarkAsReady(localPlayer, teamName, Team1, Team2)
	print(localPlayer.Name) --/Comment1
	print(teamName) --/Comment2
	print(teamName .. " ") --/Comment3
end

LoadingScreenMarkAsReadyEvent:OnServerEvent:Connect(LoadingScreenMarkAsReady)

Comment1: Consteleo

Comment2: Consteleo //???

Comment3: Error: Attempt to concatenate Instance with string. //?????????????

There is no line jump in my actual code. It's just in the preview of ScriptingHelpers Lua code block

3 comments

1

The OnServerEvent signal automatically receives the Client firing the Remote. The first argument is a l w a y s the Player Object of said Client. You haven't accommodated for this, which has pushed each parameter over one.

1

The quickest fix is to remove the redundancy in your LocalScript. Don't pass the Player when calling :FireServer().

0

Oh my god, thank you very much. You have saved my sanity. Bless your day!