BindableEvent:Wait() not returning the argument?

So the bindable event return the argument outside the bracket and I don’t know how to get the argument that it’s returning?

script.Parent.Triggered:Connect(function(playerWhoTriggered)
	local plrName = playerWhoTriggered.Name
	
	if not inCombat then
		inCombat = true
		combatRequest:Fire(plrName)
		
		local combatEndedPlayer
		repeat
			combatRequest.Event:Wait(returnedArgument)
			combatEndedPlayer = returnedArgument
			print(returnedArgument .. "=" .. plrName .. "?")
		until combatEndedPlayer == plrName
		inCombat = false
	end
end)

You should be able to just do
local returnedArgument = combatRequest.Event:Wait()

1 Like

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