Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can Someone Help With Mouse.Hit?

Asked by 8 years ago

Hello, What I did is take the paintball Roblox Model and deleted everything inside, except the handle. I inserted the following LocalScript below:

player = game:GetService("Players").LocalPlayer
tool = script.Parent
tool.Equipped:connect(function(mouse)
    print(mouse.Hit.p)
end)

Am I using the wrong method? I have a completely empty baseplate, and whenever I equip the tool, it returns (0, 0, 0). How can I get the exact position of where the mouse is pointing? Thanks for reading.

1 answer

Log in to vote
0
Answered by 8 years ago

I don't know if this is the answer you are looking for but you could get the mouse from the player using

local mouse = player:Getmouse()
0
Thanks! ... Man, how could I be so stupid! :) yoman1776 85 — 8y
Ad

Answer this question