You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
i want to make custom blacklistpart based on the name of the instances for my raycast i also using fastcast to make it more smoother -
What is the issue? Include screenshots / videos if possible!
the raycast ending like getting destroyed it did not really ignore the blacklistpart
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i tried using this code
local blacklistpart = {
["Part"] = true }
caster.RayHit:Connect(function(ActiveCast, RayResult, segmentVelocity, cosmeticBulletObject)
if not blacklistpart[RayResult.Instance.Name] then
local explosionsound = script.Explosion:GetChildren()
explosionsound[math.random(1, #explosionsound)]:Play()
local explosion = Instance.new("Explosion")
explosion.BlastRadius = 30
explosion.Position = RayResult.Position
explosion.Parent = workspace
explosion.DestroyJointRadiusPercent = 0
game:GetService("Debris"):AddItem(explosion, 1)
cosmeticBulletObject:Destroy()
end
end)-- i dont really want to show all the codes