Okay, so I am trying to make a ParticleEmitter show up when someone dies. So like when someone dies, a dollar sign appears over their head. I currently have the following script, which is inside of the script below it. I don't think the 2nd script is the problem, but you may correct me if I'm wrong. Thanks!

function onPlayerDied(dead)
			local head = script.Parent.Head
		
			local Cash = Instance.new("ParticleEmitter")
			Cash.Transparency = 1
			Cash.Texure = "rbxasset://textures/particles/sparkles_main.dds"
			Cash.EmissionDirection = "Top"
			Cash.Lifetime = math.random (5,10)
			Cash.Speed = 2
			Cash.Rate = 1
			Cash.Position = head.Position
			Cash.Name = "Money"
			Cash.Parent = game.Workspace
			
end


script.Parent.Humanoid.Died:connect(onPlayerDied)

local h = newPlayer:FindFirstChild("Humanoid")
if h ~= nil then
	local aScript = script.BloodScript:clone()
		local name = newPlayer.Name
		local player = script.Parent:findFirstChild(name)
			aScript.Disabled = false
			aScript.Parent = player
end
end

script.Parent.ChildAdded:connect(onPlayerRespawned)

1 comment

0

Where is the script located?