When a player kills an npc I want to make it so that a gui would appear showing how much XP the player has earned.. If you guys could help me figure out just how to make a gui appear I could do the rest with the XP and such.
here's what I tried
local Humanoid = script.Parent.Enemy function PwntX_X() local tag = Humanoid:findFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then local Leaderstats = tag.Value:findFirstChild("leaderstats") if Leaderstats ~= nil then Leaderstats.XP.Value = Leaderstats.XP.Value + 3 game.startergui.xp.Frame.visible=true wait(1) game.startergui.xp.Frame.visible=false wait(0.1) script:remove() end end end end Humanoid.Died:connect(PwntX_X)