TRYING TO MAKE A CASH DROP ON DEATH!!!!!! Okay so ignore the title but... im trying to make a Drop cash on death, You see... I made the Cash and put it in replicated storage... inside it's brick is
--Under this is the block, Its placed inside Replicated Storage and is being called.
local b = script.Parent --Block Placed inside of Replicated Storage.
b.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value + 239
end)
--Ok so this under is what i put in Starter Character
local deb = false
local mon = game.ReplicatedStorage.GoldBrick:Clone()
local hum = script.Parent:WaitForChild('Humanoid')
local Head = script.Parent:WaitForChild('Head')
if hum.Health < 1 then
if not deb then
deb = true
mon.Parent = script.Parent.Parent
mon.Position = Head.Position
wait(1)
deb = false
end
end
Like cmon, I've think i did it right... I cloned and teleported the block to the Players head soooooooo... am i supposed to add the effect in the Starter character script instead??

4 comments
SOMETHING's WRONG... I USED -----------
This is very confusing, can you clarify? What is the issue here? Also, can you put your code inside a code block?
What are you trying to do?, what do you need help with?, what is the effect?
U can try ro use a Health Changed, i think u cant teleport brick becouse u use If w/o any event (like Changed or Touched) or while true do