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 4 years ago
Edited 4 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()

if hum:findFirstChild("creator") then
    if hum.creator.Value then
        if hum.creator.Value.TeamColor == ply.TeamColor then
        Msg("You were teamkilled by: "..hum.creator.Value.Name)
        else
        Msg("You were killed by: "..hum.creator.Value.Name)
        end
    end
end

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 — 4y

Answer this question