Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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()

1if 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)
5        else
6        Msg("You were killed by: "..hum.creator.Value.Name)
7        end
8    end
9end

But this does not seem to work.

0
How about you either post more code and be more specific or just not ask. We're not here to make you your scripts. CeramicTile 847 — 5y

Answer this question