local Players = game:GetService("Players")
local plr = game.Players.LocalPlayer
local frames = script.Parent
local function onCharacterDespawned(player)
frames.PlayerName = player.Name .. " Has been killed"
print("Working 2!")
end
local function whenYouDie(player)
plr.CharacterRemoving:connect(function()
onCharacterDespawned(player)
print("Working!")
end)
end
Been trying random things for 2hrs, nothing works.
Its inside the starterGUI folder in a local script, inside of the frame itself.
I want the textLabel to call out the name, of the person who just died.
Thanks in advance.

2 comments
Hmm it doesn't work. it is because its a localscript? If i have to put it in a regualr script, how do i accses the text value in the GUI since the script is in another folder then
yes put it in a script. You have to use a remote event and use the FireAllClients function which makes everyone's gui say they have died. go to roblox developer hub and search fireallclients to see how it works