Bat isn't given to player?

I want to give the player a bat when the game starts; however when I attempt to do so it starts the game but doesn’t give them a bat.

It produces no errors at all but prints it gave the player the bat. This method of checking worked for the start but not giving the bat?


local replicatedstorage = game:GetService("ReplicatedStorage")
local eventmap = replicatedstorage.MapChosen

local serverstorage = game:GetService("ServerStorage")
local bat = serverstorage.Bat

local players = game:GetService("Players")

	for i, player in pairs(players:GetPlayers()) do
		if player.GameValues.InGame.Value == true then
			print("gave players bat")
			bat:Clone().Parent = player.Backpack

Said script is inside ServerScriptService

You need to have the player reference as first argument inside the event call.

Replace this:

the player is already referenced though?

alright I fixed it; I just did the copying inside the script which fired the event (since it wasn’t a big deal not to). I had to specify the copy and then tell the copy what it’s parent was.