So, I made a gun (a Tool) that shoots when Activated, and the bullet Velocity is set by the Handle Position and the mouse Hit.p. In solo it works fine, but when I tried running in a server, an error said that the mouse, obtained in the Equipped event, is no longer active and it disconnected the event. Theres my script resumed:
script.Parent.Equipped:connect(function(mouse)
handle = script.Parent.Handle
script.Parent.Activated:connect(function()
if script.Parent.Enabled == true and mouse then
-- bullet creation and other stuff
bullet.Velocity = (handle.Position - mouse.Hit.p).unit * -500
-- more irrelevant stuff
end
end)
end)
In the line 6, the output says "This Mouse is no longer active", what happened and how do I fix it?
Observation: the Equipped wiki page has some notes, maybe there is some relation.
