I made it so that whenever we die, it randomizes the text and shows the death screen but I want to make it better and cover the whole screen.
Death Text Script :
local RandomText = {
"OOF!", "Why did you do that?", "Better luck next time..", "You Cannot Escape!"
}
local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local char = plr.Character or plr.Character:Wait()
local hum = char:WaitForChild("Humanoid")
local fr = script.Parent.Frame
local YouDied = fr.YouDied
local ImageLabel = fr.StaticScreen
hum.Died:Connect(function()
YouDied.Text = RandomText[math.random(1,#RandomText)]
for i = 1,0.2,-0.1 do
fr.BackgroundTransparency = i
YouDied.TextTransparency = i
wait(0.07)
end
end)
Please let me know your suggestions and how can I make it better.
Thanks!
If I can suggest something, I would suggest you make a sort of a black banner behind your text where it is located in. This way the player could read the death message better.