function module.IceMeteor(player, character, staff, abilityNum, mousePos)
local iceStats = abilityStats.IceMeteor
local caster = fastCast.new()
local rayParams = RaycastParams.new()
rayParams.FilterDescendantsInstances = {character}
rayParams.FilterType = Enum.RaycastFilterType.Exclude
local behavior = fastCast.newBehavior()
behavior.RaycastParams = rayParams
behavior.MaxDistance = iceStats.MaxRange
behavior.Acceleration = Vector3.zero
behavior.CosmeticBulletTemplate = abilityItems.IceMeteor.Hitbox
caster:Fire(character.HumanoidRootPart.Position, (mousePos - character.HumanoidRootPart.Position).Unit, iceStats.MaxRange, behavior)
local bullet
local first
caster.LengthChanged:Connect(function(activeCast, lastPoint, rayDir, displacement, _, cosmeticBulletObject)
if not first then
first = true
activeCast:AddVelocity(cosmeticBulletObject.CFrame.LookVector + Vector3.new(0,0, iceStats.ProjectileSpeed))
end
cosmeticBulletObject.Parent = workspace
local blength = cosmeticBulletObject.Size.Z/2
local offset = CFrame.new(0,0,-(displacement-blength))
cosmeticBulletObject.CFrame = CFrame.lookAt(lastPoint, lastPoint+rayDir):ToWorldSpace(offset)
bullet = cosmeticBulletObject
end)
useAbility:FireClient(player, "IceMeteor")
end
Hello, i need some help with bullets. I am making a projectile for a game I am working on, and I want the bullet to be slower than what it currently is. Reading the documentary all I can find is properties such as Velocity and Acceleration, which are both Vector3 values, and when I try to slow the bullet down by adding a -z value, the velocity or acceleration is no longer relative and ends up going one direction. Im not sure what to dom, any help is appreciated thank you