UserInputService.InputBegan firing twice

are you sure the script isnt being duplicated? Check the output and see if they are coming from the same script.

Im pretty sure they are being duplicated but the problem is where? I don’t remember duplicating it or what it was in. Im not at my computer right now but I’ll will check in about 20 minutes

uis.InputBegan:Connect(function(input, gpe)
	print(input.UserInputType)
	local playergui = game.Players.LocalPlayer.PlayerGui
	
	if gpe then return end
	if input.UserInputType == Enum.UserInputType.MouseButton1 and input.UserInputState.Name=='Begin' then -- if button pressed, not released
...```

make a new script and copy the code from the old one into the new one, for some reason this helped me (writing this for those who has the same problem)