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

How do I make someone tele randomly?

I mean, how do I make someone tele in that certain area randomly?

1 answer

By randomly do you mean at a random time or to a random position?

If you mean to a random position on a part, you could do the following:

local plr = game.Players.Player1
local part = workspace.Part

repeat wait() until plr.Character

local randx = math.random(part.Position.X - part.Size.X/2, part.Position.X + part.Size.X/2)
local randy = part.Position.Y + 3
local randz = math.random(part.Position.Z - part.Size.Z/2, part.Position.Z + part.Size.Z/2)

plr.Character:MoveTo(Vector3.new(randx, randy, randz))

1 comment

0

Yes, I mean random position on a part, thanks.

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