Hi, is BodyVelocity's MaxForce can be added math.random() after the lookVector *? I wanted the MaxForce be random?
v.Velocity = char.HumanoidRootPart.CFrame.lookVector * 80
Hi, is BodyVelocity's MaxForce can be added math.random() after the lookVector *? I wanted the MaxForce be random?
v.Velocity = char.HumanoidRootPart.CFrame.lookVector * 80
Try this:
local maxSpeed = 90 -- set this to what you want
local minSpeed = 10 -- set this to what you want, but make it higher than 0
local bv = workspace.Bullet.BodyVelocity --Change this please, I don't know where the BodyVelocity is located
local char = player.Character -- Again, change this if needed
assert(maxSpeed >= minSpeed,"Max speed is lower than minSpeed")
v.Velocity = char.HumanoidRootPart.CFrame.lookVector * math.random(minSpeed,maxSpeed)
Change the variables to make this work, I honestly don't know where char or bv is located.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
v.Velocity = char.HumanoidRootPart.CFrame.lookVector * math.random(1, 80)
deleted post cos I gave a very dumb answer, didn't read the lookvector part