of     1   

Iron_Creeper
#224028156Monday, August 21, 2017 1:24 PM GMT

So basically what the title says, i need some help scripting inside an enemy, when that enemy is killed by a player how do i make it so a GUI updates inside of a players GUI. For example a list of enemies you have killed in the game so far.
Iron_Creeper
#224029051Monday, August 21, 2017 1:47 PM GMT

Bump
Iron_Creeper
#224029154Monday, August 21, 2017 1:51 PM GMT

Really? How does nobody know this? I thought this was simple enough for the forum to answer.
F4ULT1NTH3D4T4
#224029375Monday, August 21, 2017 1:57 PM GMT

put this inside of whatever function damages the player in your weapon: local tag = Instance.new("ObjectValue",Humanoid) --Humanoid needs to be defined to the damaged humanoid tag.Name = "creator" --most popular name for these kind of things tag.Value = game.Players.LocalPlayer --reference to our player for when the humanoid dies in a server script: workspace.ChildAdded:connect(function(child) --when something gets added to the workspace local Humanoid = child:FindFirstChildOfClass("Humanoid") --checks if the added thing has a humanoid if Humanoid and Humanoid:FindFirstChild("creator") then --is the humanoid and the creator tag present ? Humanoid.creator.Value.Kills.Value = Humanoid.creator.Value.Kills.Value + 1 -- replace this by the path to whatever value defines the amount of kills the killer has --add the gui text changing stuff here end end)
Iron_Creeper
#224029673Monday, August 21, 2017 2:05 PM GMT

thanks i will check if this works
iHydorr
#224030698Monday, August 21, 2017 2:35 PM GMT

lol
Iron_Creeper
#224073787Tuesday, August 22, 2017 12:23 PM GMT

Okay so i didn't get to testing it yet because when you posted that i had to go. But i already see something wrong, well not exactly wrong but i wanted to know how to script the changes to the GUI, but that's what you left out. Plus i don't have a kill counter in my game.
Iron_Creeper
#224074203Tuesday, August 22, 2017 12:42 PM GMT

anyone know how to do this?
Orced
#224074881Tuesday, August 22, 2017 1:13 PM GMT

You have to script your weapon to do something specific. So when the weapon "hits" something, let it check what it hits, place a BoolValue (for example) and when the character that got hit dies, set BoolValue to true and inside the script let it recieve that "Changed" event. (BoolValue.Changed:connect(function(trueorfalse)-- X) and where the X is, check if trueorfalse is true and try to find player's gui and update it.
Iron_Creeper
#224089000Tuesday, August 22, 2017 8:17 PM GMT

I have no idea how to do that though, i need help with the actual script because i dont know how to script stuff yet
LaeMVP
#224089078Tuesday, August 22, 2017 8:19 PM GMT

then start learning

    of     1