I need a sickness in my game and I don’t know how to script it to choose a random person, spread from person to person, show symptoms, and be curable. I’m very new to game making.
I’ll give you an idea for spread, in one of my games i made a zombie infection script, and the way it spread was that players had a BoolValue
inside of them, if the value was true then the player would become a zombie.
To choose a random person you’ll need to get the game.Players:GetChildren()
and get a random player.
To be curable i made it so if the value was set to false the person would be healthy again.
To show synptoms it depends a lot on what you want so i recommend doing specific research.
Also i don’t recommend doing threats like this because you sound like you want full scripts, and that’s not how the devforum works.
If you don’t find anything here try searching on already existing threats and tutorials over the internet. Hope i helped
You could maybe use this alongside bindable events/functions or I guess you dont need other scripts you can just modify the main script
In summary, for this to work you need the mechanics listed below:
-
Make a function that gathers all children of
Players
and return a random user. -
Apply sickness to player model and show symptoms via workspace scripts.
-
Continue spreading via workspace script added onto the player’s body model.
-
Create a script that lowers the
health
value on the player’s humanoid at a certain interval of time in a separate thread using thespawn()
method.