I wanna make a system where you get a kill to get a new gun but im having trouble detecting when the player kills someone.
so how would I know when the local player gets a kill?
I wanna make a system where you get a kill to get a new gun but im having trouble detecting when the player kills someone.
so how would I know when the local player gets a kill?
In whatever script you deal damage to someone, check if the hit killed them (Humanoid.Died or Health <= 0), if so, give them the next gun.
Alternatively, you can make a system that detects all deaths and gets the last person who hit the person that died.
how do i make the alternative one?
Humanoid.Died mixed with a Module or ObjectValue which holds the last person that hit someone for each player in game.
do you know where to guide me for a tutorial or something for that?
A guide isn’t necessary. You simply need to know the components mentioned and figure out how to combine them into what you want.
Although, you can search for one here if you need it.