Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What happens in "This Mouse is no longer active"? - ANSWER PLEASE

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.

1 answer

You cannot get Mouse Hit position through a normal script, You have to do it through a local Script and then use a remote event for it (if ur using Filtering enabled)

This discussion is preserved as it was. New answers, comments, and votes are closed.