UserInputType Dont work

I have a UserInputService and then a UserInputType But forsome reason after i press e and then my left button mouse it doesen’t print out “Clicked”


Services.UerInputService.InputBegan:Connect(function(input, p)
	if p then return end
		if input.KeyCode == Enum.KeyCode.E then
			print("Pressed E")
		local UpperTorso = player.Character:FindFirstChild("UpperTorso")
		wall.Parent = workspace.Ignore
		
		if WC.configure.Actived == false then 
			WC.configure.Actived = true
			wallShower(mouse, UpperTorso)
	
		if input.UserInputType == Enum.UserInputType.MouseButton1 then
			print("Clicked")
		end
			
		else
			print("Disconnect")
			loopConnection:Disconnect()
			WC.configure.Actived = false
			wall.Parent = nil
		end
			
	end
end)

i’m guessing it wasn’t working because you spelled “UserInputService” like “UerInputService”
I also changed the way you accessed the service into something a lot better imo

local UserInputService = game:GetService("UserInputService")

UserInputService.InputBegan:Connect(function(input, p)
New Code
local UserInputService = game:GetService("UserInputService")

UserInputService.InputBegan:Connect(function(input, p)
	if p then return end
		local UpperTorso = player.Character:FindFirstChild("UpperTorso")
		wall.Parent = workspace.Ignore
		
		if input.KeyCode == Enum.KeyCode.E then
			print("Pressed E")

		if WC.configure.Actived == false then 
			WC.configure.Actived = true
			wallShower(mouse, UpperTorso)
	
			if input.UserInputType == Enum.UserInputType.MouseButton1 then
				print("Clicked")
			end
		else
			print("Disconnect")
			loopConnection:Disconnect()
			WC.configure.Actived = false
			wall.Parent = nil
		end
	end
end)

hope this works!

no thats not the problem my services is in a moduel script i just spelled the variable name wrong

ok I reread the question and you want left click to only work after you press e?
because right now in your code pressing e only prints something

Hi how can I help Bruxtl? What’s up with your UserInputService?

yah basically its not printing click after i pressed e

Okay I’ll try fix that. Have you tried any methods yet?

its not printing after i press my left mouse

I’ll try fix that and test it on Roblox studio.

i cheaked every where i cant find a clue i tried elseif but it didn’t really do anything, and i tried to remove the if statement. I also closed my roblox studio still no work. Also wdym by ill try and fix that?

Well i try give you another script to make it work I’ll reply back if i cant find anything.

okay ill try to find more info ty tho

No problem bro. I think i found the problem

What is the bug mind if you tell me

Did you add local script or script or module script? or did you add any script to a part?

the local script is in a StartPlayerScript and all my services are in a module

Okay I’ll find the problem in there if it doesn’t work or not.

Okay ill also try to find bugs

Do you mean Starterplayerscript in Starterplayer?

yes (igore this worry im trying to get this 30 words count)