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

Why is the mouse's position not printing when I click?

When you equip a tool, every click's position is supposed to be printed, but it doesn't, and no error comes up?

This is inside a LocalScript inside a tool.


script.Parent.Equipped:connect(function(mouse)
	mouse.Button1Down:connect(function()
		print(mouse.Hit.p)
	end)
end)

1 comment

0

Does the tool have a Handle?

1 answer

✓ Accepted answer

Hey obcdino,

I think the reason that your tool isn't printing the mouse's position is because the tool doesn't have a handle. For whatever reason, Roblox decided to make their tool API like this, so if you want to confront somebody about this, just ask them. But yeah, that is why your mouse's position isn't printing. You just need to put a Part inside the tool, and give it the name "Handle".

##I hope I helped, and have a nice day.

~~ KingLoneCat

4 comments

0

I don't think any of tool's events get activated unless it has a Handle...

0

Thank you for the answer, but why is the API like this?

0

you can set the property RequiresHandle to false or use a HopperBin if you dont wish to use a handle

0

^ HopperBins are deprecated.

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