I am attempting to make a tool that can launch “Bullets” and accurately hit the target directly where the mouse is positioned.
I have concluded upon using part velocity to launch these bullets to their desired target, however part velocity seems to have a range limit regardless of what the speed is set to.
I used a brief tutorial on how to use part velocity to get me where I am now, however there seems to be no topics regarding my issue.
Here is the velocity code, the bullet is “looking” at the target which is positioned directly at the player’s mouse coordinates, then it is launched in that direction.
Alr, firstly create a RemoveEvent and name it “CreateBullet”, replace it into ReplicatedStorage. Then create LocalScript in StarterGui and paste in it this:
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character ~= nil
local char = plr.Character
local mouse = plr:GetMouse()
mouse.Button1Down:Connect(function()
game.ReplicatedStorage:FindFirstChild("CreateBullet"):FireServer(mouse.Hit)
end)
Then create server script (Script) in ServerScriptService and paste in it this:
make an body force inside the bullet and set the bodyforce Y to like 192.6 nearly like the gravity of workspace
it will take kinda long if the workspace gravity is 196.2