✓ Accepted answer
There are a few things wrong with your code. One is that by saying plr.MouseButton1Down, you're looking for an object called "MouseButton1Down" in your player. MouseButton1Down is for GUI objects, like text-buttons. You're supposed to be using the Button1Down event on your mouse. Research raycasting later.
local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:wait()
local right_arm = character:findFirstChild("Right Arm")
if not right_arm then print("Can't find arm") return end
local mouse = plr:GetMouse()
local projectile = Instance.new('Part')
projectile.Shape = 'Ball'
projectile.Size = Vector3.new(1, 1, 1)
local body_force = Instance.new("BodyForce", projectile)
body_force.force = Vector3.new(0,projectile:GetMass() * 196.2,0)
local lifetime = 20
mouse.Button1Down:Connect(function(onclick)
local mouse = plr:GetMouse()
local point = mouse.Hit.p
local this_projectile = projectile:Clone()
local spawnPosition = (right_arm.CFrame * CFrame.new(0, 0, -2)).p
this_projectile.CFrame = CFrame.new(spawnPosition, point)
this_projectile.Velocity = this_projectile.CFrame.lookVector * 200
this_projectile.Parent = workspace
game.Debris:AddItem(this_projectile, lifetime)
this_con = this_projectile.Touched:Connect(function(hit)
this_con:disconnect()
if hit then
local player_hit = game.Players:GetPlayerFromCharacter(hit.Parent)
if player_hit and player_hit ~= plr then
local hum = player_hit.Character:FindFirstChild("Humanoid")
if hum then
hum:TakeDamage(10)
end
if this_projectile then this_projectile:Destroy() end
end
end
end)
end)