Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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:

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

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))

2 comments

0

Then just delete the post so people dont have to click on the post again

0

I was going to, but the website told me to not in case somebody else needed help.

This discussion is preserved as it was. New answers, comments, and votes are closed.