if you have played fps games you must have seen those guis it shows on screen like double kill rampage etc. im trying to recreate that in my game
guis showing kill streak mile stones like double kill, multikill,rampage,etc.
i tried looking for it on dev hub, youtube,etc. but it has never been done before, i am also curious if this is even posible (i think it is though)
i am also working on a kill chat script like who killed who chat
i am new to raycasting and also was wondering if this can be done with melee
p.s- please tell me if i used the wrong tags or title or if i am posting in the wrong place or something i just became a member 30 mins ago or so
Wouldn’t it be quite simple to do that? Or did I not understand your problem properly?
You could keep track of how many players a player has killed with a variable, maybe, and when you change it you also check if the number matches a milestone. If it does, show the gui related to that milestone. When the player respawns, reset the value of that variable to 0.
ik but i mentioned in the question that i didnt even make a kill chat so like idk how to do that all i did is add a damage script, not who killed who script
When you damage someone, you can check if the humanoid’s health is 0 after it’s damaged. If it is, increase the kills of the player who damaged them. And also send a message to the kill chat, of course.
You could put the entirety of it in its own module if you wanted to.
There are 3 methods you want to pay attention to.
clientdata:CreateCache(Player Instance)
Creates a cache for the player. When a player is a fresh spawn, call this method and pass in their player instance. This will delete the saved data from their last life so that people who damaged them before they died the previous round won’t accidentally get a kill if they die again.
clientdata:DamageDealt(Player Instance of Defender, Player instance of Attacker, Dmg Amount)
This records damage. Whenever a player deals damage to another player, you want to call this method. Whoever gets shot and loses health should be passed in first, whoever is shooting should be passed in second. The damage amount is the final argument.
clientdata:GetKiller(Player Instance)
This returns two values. the Most Recent Damage Dealer, and the Highest Damage Dealer. What you do with this information is then entirely up to you, but it should be called right after a player dies. (Humanoid.Died) Lots of games like to do “Assist count as kill” systems. This gives you flexibility to do whatever you want. Generally the most recent dealer is the killer, where the highest dealer is the assist count as kill. If these are the same people, then no assist count as kill needs to be awarded.
You could add another method that analyzes the “clientdata.Cache[player.UserId].LifeDamage” value and find other assists as well if you wanted to, but I didn’t add a method for that.