How do you make random player sick in Story game like Camping or Airplane?
Hi there, I am making a story game like Camping or Airplane, and if you played, you would know that a random player gets sick. In Camping, you die, but in Airplane, you have a chance to live. I want to go with the Airplane option where once you are poisoned, you can touch or click a med-kit, and it will save that random character, but if not in time, they die. I'm fine with the Camping option, and I made a script. Here it is:
01 | local dialogue = game.ReplicatedStorage.Dialogue |
02 | local type = Enum.ThumbnailType.HeadShot |
03 | local size = Enum.ThumbnailSize.Size 180 x 180 |
05 | function Message(player, speech, id) |
06 | dialogue:FireAllClients(player, speech, id) |
09 | local players = game.Players:GetChildren() |
10 | local dead = players [ math.random( 1 , #players) ] |
11 | local id = game.Players:GetUserThumbnailAsync(player.UserId, type , size) |
12 | Message(player, "I don't feel good..." , id) |
13 | dead.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.KillBrick.Position) |
It isn't a local script, and the "end" at the end has an error. Please help, and thank you!