Players.ZensStarz.Backpack.Combat:23: attempt to index boolean with 'UserInputType'

UIS.InputBegan:Connect(function(isTyping, Input)
	
	if Input.UserInputType == Enum.UserInputType.MouseButton1 then
			print("Working...")
			if Debounce == false then
				Debounce = true 
				curr = os.clock()
				
				
				local PT = curr - prev
				if PT < 1 then
					sequence = sequence.."L"
					if string.len(sequence) > 4 then
						print("Resetting Combo.")
						sequence = "L"
					end
				else
					sequence = "L"
				end
				
				Combat:FireServer(sequence)
			end
		end
	
end)

Combat.OnClientEvent:Connect(function(bool)
	prev = curr
	
	if bool then
		wait(cds[2])
		Debounce = false
	else
		Debounce = false
	end
end)

So, I decided to remake the combat. Learning from a tutorial and the combat just didn’t work whatsoever. Therefore I just decided to edit to my liking/to make it work for r6. It’s just an attempt to get a better hold on combat creation and module usage.

1 Like

I believe the error itself is coming from the order of parameters in your InputBegan event. swap the positions of “isTyping” and “Input.” Right now Input is the boolean and isTyping is the input object.

1 Like

Ah, I’ll check if that is the case.

Sorry, I forgot to say thank you, this was indeed the problem.

1 Like