This following script is supposed to instance a new part, and make it shoot towards the player but it dosent do that! Thanks for the help
local function Shoot()
local bullet = Instance.new("Part", workspace.Bullets.EnemyBullets)
bullet.Size = Vector3.new(0.3,0.3,0.3)
bullet.Material = "Neon"
bullet.CFrame = Enemy.Torso.CFrame * CFrame.new(0,0,-4)
bullet.CanCollide = false
local velocity = Instance.new("BodyVelocity", bullet)
velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bullet.CFrame = CFrame.new(bullet.Position, game.Players.LocalPlayer.Character.HumanoidRootPart.Position)
velocity.Velocity = bullet.CFrame.lookVector * 500 + Vector3.new(math.random(-25,25),math.random(-25,25),0)
end
while wait(2) do
Shoot()
end

2 comments
Is the script a LocalScript?
yes it is. I've tried it in a server script and didn't change anything