So I made a gun that uses Instance.new() The problem Is the bullet not going foward
SCRIPT:
local tool = script.Parent
local debounce = false
tool.Activated:Connect(function()
if debounce == false then
debounce = true
local newBullet = Instance.new("Part")
local Thrust = Instance.new("VectorForce")
local Attachment = Instance.new("Attachment")
newBullet.Parent = game.Workspace
Thrust.Parent = newBullet
Attachment.Parent = newBullet
newBullet.Size = Vector3.new(1,1,1)
Thrust.Force = Vector3.new(10000,300,0)
newBullet.BrickColor = BrickColor.Yellow()
newBullet.Anchored = false
newBullet.Position = script.Parent.Launcher.Position
newBullet.Orientation = script.Parent.Launcher.Orientation
newBullet.Touched:Connect(function(hit)
local humanoid = hit.Parent:WaitForChild("Humanoid")
if humanoid then
humanoid:TakeDamage(100)
end
end)
wait(3)
newBullet:Destroy()
debounce = false
end
end)

2 comments
Oooooh I forgot! Thank you!
I'm glad it worked! If so please mark it as the answer, thank you!