So I checked from last time, I have a mouse script in 2 scripts but they keep fluctuating, in other words, one script will use the mouse event and the other script won't so, I am quite confused why this is happening and if there is a solution... All scripts acrhivable and not disabled...

Script 1:

local function onPlace()
	print('SCRIPT_1')
end
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Button1Down:Connect(function()
	onPlace()
end)

Script 2:

local function onOtherPlaced()
	print('SCRIPT_2')
end
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Button1Down:Connect(function()
	onOtherPlaced()
end)

It either prints script 1 or script 2, I don't know if it has something to do with user input service, any help, thancc

3 comments

0

Events can have multiple listeners.

0

are you using a local script for this?

0

yeah....