Player argument must be a player object error (REPOST)

It keeps giving me this error even though the player argument is a player object. (THIS IS A REPOST SINCE I DIDN’T GET ANY WORKING ANSWERS)

local function CheckMagnitude(plr)
	print("Close!")
	ClosingTween:Play()
	DoorBang:Play()
	SmilerLight.Brightness = 0
	Alarm:Stop()
	SmilerScreeh:Stop()
	
	wait(3)
	
	GameWin:FireClient(plr)
end

repeat
	wait(0.1)
	print("Still Waiting!")
until (Darkness.Position-Trigger.Position).Magnitude < 4

CheckMagnitude()

This is not sending a player to the function. You can confirm this by simply adding the line in to the function:

print(plr)

This is guaranteed to be nil. How are you getting the player???

You need to define the player. You can’t just do something like:

local function Math(Player)
-- Obviously, we don't need the Player argument for this but this is for example purposes only.
print(math.random(1, 100))
end

Math()

As much as we would like, the Player argument doesn’t just appear out of nowhere.