When a player gets 2 kills and a gui pops up for a second

How do I make when a player gets 2 kills and a gui pops up for a second?

Any thoughts?
Please Help

And I’m a beginner at scripting and if you find anything for me to learn off I will be even more happy :stuck_out_tongue:

You could track the player’s kills using a variable, and firing a remote event when it equals two.
Add a StarterGui, and add a local script in it which makes it visible whenever the remote event is fired. If you need help in tracking the kills then you’ll have to use raycasting.

Yea can you show me an example please I’m like a visual learner

Please specify - do you need help with the kill tracking part or the GUI part?

Yes I would like your help please

I asked a question - with which part?

I’m having trouble with the GUI part and the kill tracking part. I got the code but I don’t understand and I would like it to have the player to get 2 kills in arrow like double kill

game.Players.LocalPlayer.Character:WaitForChild(‘Humanoid’).Died:connect(function()
script.Parent.ImageLabel.Visible = true
end)

You’d have to track the kills on the server through some sort of variable and check that, whenever a player gets a new kill, they haven’t gotten one within the past x seconds, and if they have, fire all clients with the GUI.

For example, it’d look something like this:
1 - playerA and playerB are fighting
2 - playerA kills playerB.
3 - playerBs death is notified on the server and is stored within a nested array, so something like such: {{playerName, time}}
4 - Server checks if they have killed someone else within the past 10 seconds, which is false.

5 - playerA kills playerC
6 - playerCs death is notified as like before.
7 - The server checks if there has been a kill within the past 5 seconds from playerA, which is true.
8 - The player is notified with the GUI either through a remoteEvent to client script or straight from the server.

1 Like

Thanks but how do I write it has a script?

With pen and paper.

I can’t exactly just write it out for you, especially since it’d be a rather large script. As long as you follow the pipeline of instructions I gave you when writing it you’ll be fine, however you’ll either have to use a Died event or (the better solution) would be to store their death from the weapon, i.e. if a sword does 50 damage and kills me then that gets passed as me dying to the double kill script.

No I want to learn for my self and see how functions are actually work. I just need to be a little simpler because Im a basic scripter. If you have and thing for me to learn about scripting I will be more happy Thanks :stuck_out_tongue:

I cannot exactly make it simpler because the contents as of which you are asking for requires an intermediate level of understanding of the language. If you do not understand certain parts of the program, you may google it or whatever means you have to do as such.

@Benified4Life Ok I will but can you offer me and good scripting tutorials

Well, you’ll need to have knowledge about the following stuff -

  1. Client server model
  2. Basic Gui manipulation
  3. Raycasting

Of course, it’s a different story if you’re completely new to scripting. If so, I suggest you check out the playlist ‘Make Your First Game’ by Gnomecode, on You Tube.

1 Like