RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a script inside a NPC that gives a slime popping particle when NPC is dead"
-- server script inside the NPC local NPC = script.Parent local humanoid = NPC:WaitForChild("Humanoid") local particle = Instance.new("ParticleEmitter") particle.Texture = "rbxassetid://YOUR_PARTICLE_TEXTURE_ID" particle.Rate = 100 particle.Lifetime = NumberRange.new(1, 2) particle.Size = NumberSequence.new(0.5, 0) particle.Speed = NumberRange.new(5, 10) particle.Transparency = NumberSequence.new(0, 1) particle.Acceleration = Vector3.new(0, 10, 0) local function onDied() local particleClone = particle:Clone() particleClone.Parent = NPC.Head particleClone:Emit(100) wait(2) particleClone.Enabled = false wait(3) particleClone:Destroy() end humanoid.Died:Connect(onDied)