I have a script everything works but the particleEmitter won’t emit when parented to the torso.
–The script
local function WeaponFire(player, mouseHit)
local result = workspace:Raycast(tool.Weapon.Barrel.Position, (mouseHit - tool.Weapon.Barrel.Position).Unit * 1000)
if result then
if result.Instance.Parent:FindFirstChild("Humanoid") then
local hum = result.Instance.Parent:FindFirstChild("Humanoid")
local humRootPart = hum.Parent:FindFirstChild("Torso")
local Particle = game.ReplicatedStorage.ParticleEmitter:Clone()
Particle.Parent = humRootPart
hum.Health -= 10
task.wait(0.2)
Particle:Destroy()
end
end
end
tool.Equipped:Connect(Anim)
game.ReplicatedStorage.WeaponEvent.SMG.OnServerEvent:Connect(WeaponFire)
(This is a snippet of the scripts but i only included the important parts)