Would I use the humanoid's target point?
Player = game.Players.LocalPlayer
mouse = Player:GetMouse()
Character = Player:GetPlayerfromCharacter()
function DownClick()
print (Character.Humanoid.TargetPoint)
end
mouse.Button1Down:connect(DownClick)
Would I use the humanoid's target point?
Player = game.Players.LocalPlayer
mouse = Player:GetMouse()
Character = Player:GetPlayerfromCharacter()
function DownClick()
print (Character.Humanoid.TargetPoint)
end
mouse.Button1Down:connect(DownClick)
Local Script
repeat wait() until game.Players.LocalPlayer.Character
local player = game.Players.LocalPlayer
local mouse = Played:GetMouse()
function onclick()
if mouse.Hit~=nil then
print(mouse.Hit)--CFrame Value of mouse position
print(mouse.Hit.p)--Value of CFrame that gives Vector3 Counterpart
end
end
mouse.Button1Down:connect(onclick)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Do you mean it's 2D position on screen or where it's pointing in the 3D world? If it's the former, use the X and Y properties of the mouse, otherwise use the Hit or Origin properties of the mouse. X and Y are int values while Hit and Origin are CFrame values.