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:

local dialogue = game.ReplicatedStorage.Dialogue
local type = Enum.ThumbnailType.HeadShot
local size = Enum.ThumbnailSize.Size180x180

function Message(player, speech, id)
    dialogue:FireAllClients(player, speech, id)
end
wait(0.1)
local players = game.Players:GetChildren()
local dead = players[math.random(1, #players)]
local id = game.Players:GetUserThumbnailAsync(player.UserId, type, size)
Message(player, "I don't feel good...", id)
    dead.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.KillBrick.Position)


end)

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!

local dialogue = game.ReplicatedStorage.Dialogue
local type = Enum.ThumbnailType.HeadShot
local size = Enum.ThumbnailSize.Size180x180

function Message(player, speech, id)
    dialogue:FireAllClients(player, speech, id)
end

wait(4)
local players = game.Players:GetChildren()
local dead = players[math.random(1, #players)]
local id = game.Players:GetUserThumbnailAsync(dead.UserId, type, size)
Message(dead, "Oh no, I'm allergic to garlic!", id)
wait(2)
dead.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