Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make random player sick in Story game like Camping or Airplane?

Asked by 5 years ago

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:

01local dialogue = game.ReplicatedStorage.Dialogue
02local type = Enum.ThumbnailType.HeadShot
03local size = Enum.ThumbnailSize.Size180x180
04 
05function Message(player, speech, id)
06    dialogue:FireAllClients(player, speech, id)
07end
08wait(0.1)
09local players = game.Players:GetChildren()
10local dead = players[math.random(1, #players)]
11local id = game.Players:GetUserThumbnailAsync(player.UserId, type, size)
12Message(player, "I don't feel good...", id)
13    dead.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.KillBrick.Position)
14 
15 
16end)

It isn't a local script, and the "end" at the end has an error. Please help, and thank you!

1 answer

Log in to vote
0
Answered by 5 years ago

Never mind! I came up with it by myself!

01local dialogue = game.ReplicatedStorage.Dialogue
02local type = Enum.ThumbnailType.HeadShot
03local size = Enum.ThumbnailSize.Size180x180
04 
05function Message(player, speech, id)
06    dialogue:FireAllClients(player, speech, id)
07end
08 
09wait(4)
10local players = game.Players:GetChildren()
11local dead = players[math.random(1, #players)]
12local id = game.Players:GetUserThumbnailAsync(dead.UserId, type, size)
13Message(dead, "Oh no, I'm allergic to garlic!", id)
14wait(2)
15dead.Character:MoveTo(Vector3.new(-349.28, 0.5, 83.68))
0
Then just delete the post so people dont have to click on the post again Azure_Kite 885 — 5y
0
I was going to, but the website told me to not in case somebody else needed help. PadmeOragana 78 — 5y
Ad

Answer this question