Hello,
I'm trying to make a weapon and this is its LocalScript:
local Players = game:GetService("Players") local Player = Players.LocalPlayer local Mouse = Player:GetMouse() if not Player.Character then repeat wait() until Player.Character end local Character = Player.Character local Humanoid = Character:WaitForChild("Humanoid") local Glock = script.Parent local Handle = Glock:WaitForChild("Handle") local Muzzle = Glock:WaitForChild("Muzzle") local OnActivated = function() local Bullet = Instance.new("Part", workspace) Bullet.Material = Enum.Material.Neon Bullet.CanCollide = false Bullet.Anchored = false Bullet.Locked = true Bullet.FormFactor = Enum.FormFactor.Custom Bullet.BrickColor = BrickColor.new("Bright yellow") Bullet.Size = Vector3.new(0.25, 0.25, 5) Bullet.Position = Handle.Position Bullet.CFrame = CFrame.new(Bullet.CFrame.p, Mouse.Hit.p) local BodyVelocity = Instance.new("BodyVelocity", Bullet) BodyVelocity.Velocity = Bullet.CFrame.lookVector * 120 end Glock.Activated:Connect(OnActivated)
But I realised the bullet's velocity is really slow. When I tried to increase it, the bullet goes in a weird way.
Is there a way I can use it without making it look weird? Thanks.
Try this https://devforum.roblox.com/t/how-to-make-ranged-weapons-with-bullet-movement/606618/4