Local:
local debounce = false
script.Parent.Equipped:Connect(function(mouse)
mouse.Button1Down:Connect(function()
if debounce == false then
debounce = true
game.ReplicatedStorage.ProjectileInfo:FireServer(mouse.Hit.Position, script.Parent.Handle, mouse.Target.Position)
wait(.5)
debounce = false
end
end)
end)
game.ReplicatedStorage.ProjectileInfo.OnServerEvent:Connect(function(Player, mousepos, handle, targetpos)
local proj = game.ReplicatedStorage.exploobj:Clone()
proj.Parent = workspace
proj.CFrame = handle.CFrame * CFrame.new(0, 0, -10)
proj.BodyForce.Force = targetpos * 50
end)
When aiming straight ahead the projectile strays left and beyond 180 degrees the projectile is just shot forward. How can I have it so it accurately and completely goes to a set place?
