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

How do I make a dialog that Teleports you to another brick?

Asked by
EpicLilC 150
10 years ago

So my game is an adventure and you are the main character so you go to the store across the street and theres this guy who poisons you and when he evil laughs how do I make you teleport to another brick or spot in the game?

1 answer

Log in to vote
0
Answered by
duckwit 1404 Moderation Voter
10 years ago

You can teleport a player by adjusting the CFrame (Coordinate Frame) of their Player's Torso.

Lets say you have a brick in a LocalScript called brickthat you want to move the player to:

brick = workspace.Destination

player = game.Players.LocalPlayer
character = player.Character
torso = character.Torso

torso.CFrame = CFrame.new(brick.Position)

Hope that helps!

0
Thank you! EpicLilC 150 — 10y
Ad

Answer this question