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

How can I teleport players to a specific area in my place?

Asked by 10 years ago

Hi,** I'm kinda new to scripting,** so sorry if I seem "noobish". How can I teleport players to a specific place?

Like, I dunno...

if (something) true then (teleport script)

Okay, thanks. I'm also new to this site, so, yeah.

1 answer

Log in to vote
1
Answered by
Everesty 1006 Moderation Voter
10 years ago

There are a few ways to teleport a player to another spot in-game.

One of the easiest to use is the MoveTo method on a player's character. It accepts a Vector3 value, which is where the player will be teleported/moved to.

Character:MoveTo(Vector3.new(x, y, z))

The other way is to set a player's torso's CFrame property. It, semi-obviously, takes a CFrame value.

Character.Torso.CFrame = CFrame.new(x, y, z)
0
Thank you! :D OfficialAndrew 45 — 10y
Ad

Answer this question