why cant A players Mouse Get Humanoid when click?
Asked by
4 years ago Edited 4 years ago
So I am Working On A gun And right Now I Need it to Find Humanoid Player When Clicking On It.
heres my script:
01 | local mouse = game.Players.LocalPlayer:GetMouse() |
02 | local Handle = script.Parent.Handle |
03 | local Gun = script.Parent |
04 | local ShootSound = script.Parent.Handle.Shoot |
06 | Gun.Activated:Connect( function () |
07 | mouse.Hit:Connect( function (Target) |
08 | if Target:FindFirstChild( "Humanoid" ) then |
09 | game.Players.LocalPlayer.Character.Humanoid:TakeDamage( 10 ) |
13 | print ( "Target Not Humanoid" ) |
The Thing is that At It dont show what line it is and It Gives a error that says (Connect is Not A vaild member of CFrame ) And I never Took CFrame on the Line.
Anyone? Help