How to list the weapon the user was killed by and who on the side of the screen after being killed?
Asked by
5 years ago Edited 5 years ago
wait(1)
local gui = script.Parent
local ply = gui.Parent.Parent
local hum = ply.Character.Humanoid
local function Msg(txt)
gui.TextLabel.Visible = true
gui.TextLabel.Text = txt
end
hum.Died:wait()
1 | if hum:findFirstChild( "creator" ) then |
2 | if hum.creator.Value then |
3 | if hum.creator.Value.TeamColor = = ply.TeamColor then |
4 | Msg( "You were teamkilled by: " ..hum.creator.Value.Name) |
6 | Msg( "You were killed by: " ..hum.creator.Value.Name) |
But this does not seem to work.