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

How shall I include this script?

Asked by 9 years ago

So I have an answer to my needs, but I don't know how to input it into the script without breaking my game! Here is what I have!

01while true do
02wait(10)
03local m = math.random(1,1)
04there are
05local player = game.Players:GetPlayers()
06for i = 1, #player do --This checks for players and gets them
07msg = Instance.new("Message") --This make the annoying messages that appear on you screen
08msg.Parent = nil --This identifies the game
09if m == 1 then --don't change unless you know what you are doing
10msg.Parent = game.Workspace
11msg.Text = "Disast Air flight 1337 has Landed!"
12wait(5)
13msg.Text = "Boarding starts in..."
14wait(1)
15msg.Text = "...3..."
View all 35 lines...

So here I have an adapted version of the LionSaysRoar Minigame Script, changed to suit my needs! However, I need it so that the character doesn't teleport to where the 'obby' begins, but leaves them in their current position!

I was given this by Merely however

1local character = player[i].Character
2local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
3if humanoidRootPart then
4    character:MoveTo(humanoidRootPart.Position)
5else
6    -- the player probably just died and his character got deleted
7end

So now I need to know how to add it to the main script!

Thanks in advance,

Michael H!

1 answer

Log in to vote
2
Answered by
Merely 2122 Moderation Voter Community Moderator
9 years ago

If you simply want to leave the character in its position and not teleport/move it at all, remove line 23 from your script.

1
I tried it before, it broke the script. I just tried it again (Not changing anything else) it now works! Thanks for your help! Appreciated. Michael007800 144 — 9y
0
hi merely Vlatkovski 320 — 9y
Ad

Answer this question