For some reason in one of my places for every mouse click 3 are registered by UserInputService. I tried opening a brand new place and it seems to register clicks as normal but in the current place I’m working on it triple clicks with the exact same script. Anyone know what could cause this?
-- We must get the UserInputService before we can use it
local UserInputService = game:GetService("UserInputService")
-- A sample function providing one usage of InputBegan
local function onInputBegan(input, gameProcessed)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print("The left mouse button has been pressed!")
end
end
UserInputService.InputBegan:Connect(onInputBegan)
What do you mean by “This is happening across different scripts that use UserInputService.” Do you have 3 InputBegan listeners? If so, InputBegan would run 3 times.
I found this bug through a different script that uses UserInputService and it has the same problem. The script I pasted above is still printing out the print statement 3 times each click and there is only one of that script. I pasted the exact same script in a new place and it only prints out once.
Still triple clicks unfortunately. I was hoping someone would know of some setting that could be changed, the bug occurred all of a sudden one day and only happens in one specific place.
Update: I found the error. I clone the entire player model twice (into viewports) and for each cloned character every time I click it seems they click as well.