So recently BodyThrust Is deprecated thus forcing me to use VectorForce, which Is actually easy to control than BodyThrust (To read about VectorForce use on this link: https://developer.roblox.com/en-us/api-reference/class/VectorForce). So anyways I decied to re-script It so It has VectorForce. The way I do It Is to add a attachment which Is parented In the newBullet (The bullet) and made newBulletThrust Instance to VectorForce, everything works besides the position of the bullet, the bullet appears to work but doesn't go to the right place, It just doesn't go to the attachment of the handle (Yep, In the tool there Is an attachment to the handle which Is places next to the muzzle) It just stays In the same places even when I move, Ill make a video soon but Im going to school soon so anyway here Is the script:
local tool = script.Parent
local pew = tool:WaitForChild("Pew")
local debounce = false
tool.Activated:Connect(function()
if not debounce then
debounce = true
pew:Play()
local newBullet = Instance.new("Part")
local newBulletThrust = Instance.new("VectorForce")
local newBulletAttachment = Instance.new("Attachment")
newBullet.Parent = game.Workspace
newBulletThrust.Parent = newBullet
newBulletAttachment.Parent = newBullet
newBulletThrust.Attachment0 = newBulletAttachment
newBulletThrust.Force = Vector3.new(0,0,-10000)
newBullet.BrickColor = BrickColor.Blue()
newBullet.Position = script.Parent.Handle.Attachment.Position
newBullet.Orientation = script.Parent.Handle.Attachment.Orientation
newBullet.Size = Vector3.new(1,1,1)
newBullet.Touched:Connect(function(hit)
local humanoid = hit.Parent:WaitForChild("Humanoid")
if humanoid then
humanoid:TakeDamage(20)
end
end)
wait(1)
newBullet:Destroy()
wait(1)
debounce = false
end
end)

2 comments
It doesn't work, sorry!
That's ok, were there any errors?