How can i make a accessory be visible for 0.4 seconds when a player dies?

So in my game, I am trying to make it look like a long red laser hits the players head for a very short moment right while they die, It can be before or after the player dies, as long as it looks like the laser killed the player, Also i have already tested it on a NPC and i put it in starter character as a hat accessory.

Does anyone have a short script idea for this? or a good and simple youtube video that could be helpful? Or just anything else?

I apprechiate help and i want to keep it as simple as possible since the game already has lots of stuff.

1 Like

you can use hum.Died event to detect when player dies and after .4 seconds , loop through the character using

for i , e in pairs(char:GetChildren())

end

variable e will be the part of the character eg(head,arms,hats) .

u will have to then check if variable e is an assesory using

e:IsA(assesory)
if that lind of code is not nil then it is an assesory

if it is an assesory then destroy it

if this is not what u want then please reply. Idk what script u need lol

1 Like