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

Can I make a player teleport to a model?

Asked by 5 years ago
Edited 5 years ago
click.Character:MoveTo(Vector3.new(game.Workspace.Model))

I just used this as an example above!

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Using Model:MoveTo() is inconvenient. Instead, assign a PrimaryPart to the model, and use Model:SetPrimaryPartCFrame()

And the Vector3.new() function takes 3 numbers as an argument, X, Y, and Z.

But here we won’t be using Vector3.

local model= game.Workspace.Model

Character:SetPrimaryPartCFrame(
    CFrame.new(model:FindFirstChildWhichIsA("BasePart").CFrame)
)
0
Thank you! y8pogo123589 0 — 5y
Ad

Answer this question