I am currently trying to make random death messages that show when a player dies.
Any help is wanted. Thanks!
Here is the script.
local DeathMessages = {
I rearranged your code to work with the Humanoid Died event to make your script not need a loop. I put this code in a Local Script in StarterPlayerScripts.
Lol and adding on to that, you could set the UI’s ResetOnSpawn property to false, and have a custom wait time after the characterAdded event for it to disappear
local Character = LOCAL_PLAYER.CharacterAdded:Wait()
Would “error”, basically, if you died once, the script wouldn’t work, @OP, you will have to connect the playerObject.CharacterAdded event to an function instead.
Yeah I found that out after testing it. I sorta threw this script together quickly. I was considering making this a Server Script but that would go out of the way of this post.
I thought of that, because i noticed that when you do something like this:
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
It would only run once, breaking after the player dies, the only way for this method to work, is by making the char variable be updated, for example when an tool is equipped and you LeftClick, and the char variable is inside, it would be updated, every time the user clicks.