For some reason, CosmeticBullets aren’t showing up. I’ve tried using the PartCache module as the PartProvider but it doesn’t work as well. No errors and everything else works
and apparently the cosmeticBulletObject argument passed from LengthChanged is nil as well
this.CosmeticBullet = Instance.new("Part")
this.CosmeticBullet.Material = Enum.Material.Neon
this.CosmeticBullet.Color = Color3.fromRGB(255, 187, 0)
this.CosmeticBullet.CanCollide = false
this.CosmeticBullet.Anchored = true
this.CosmeticBullet.Size = Vector3.new(0.2, 0.2, 2.4)
this.CastBehavior = CastRedux.newBehavior()
this.CastBehavior.RaycastParams = this.CastParams
this.CastBehavior.MaxDistance = this.WeaponData["bullet_max_dist"]
this.CastBehavior.HighFidelityBehavior = CastRedux.HighFidelityBehavior.Default
--this.CastBehavior.CosmeticBulletProvider = this.PartProvider
this.CastBehavior.ComesticBulletTemplate = this.CosmeticBullet
this.CastBehavior.CosmeticBulletContainer = CosmeticBullets
this.CastBehavior.Acceleration = this.WeaponData["bullet_gravity"]
this.CastBehavior.AutoIgnoreContainer = false
On the Fire function
this.Caster:Fire(this.FirePoint.WorldPosition, direction_new, bullet_speed, this.CastBehaviour)