How to code a infection game

Hi i want to make a infection game which half of the players in game are infected and another half are regular and trying to survive i want to code the game myself but im new to scripting can i get any tips/help also how would i make it so when a player touches another they turn green and respawn at a Team spawn and turn green?

1 Like

Ima link a Scripting series that you need to follow then you will most likely be able to do it yourself. You wont learn much by asking people to do it for you.

Link:

3 Likes

I dont want to sound mean but not everyone will help you if you dont know the basics. You need to try it then people will help you to fix your code.

Hopefully no one feels offended but I think its how it is goes.

1 Like

I recommend making a hitbox for the player whenever their character is added, and if someone who isn’t infected touches it, you loop through the hit.Parent to find their BasePart / MeshParts which is their body parts, and then you can change the BrickColor for them.

No need to add a hitbox to a player, simply use the HumanoidRootPart as a hitbox.

Yeah, but it would only work if you’re touching the player with your torso, aka right up close which could be somewhat unfair and impossible.