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

Help Teleporting Players?

Asked by 8 years ago

How would I teleport a player without killing them? The below script is a non working example :P

local player = script.Parent.Parent.Parent.Parent

button.MouseButton1Down:connect(function()
player.character.Torso.Position = game.Workspace.Block.Position
end

1 answer

Log in to vote
0
Answered by
yoshi8080 445 Moderation Voter
8 years ago
button = script.Parent
local player = script.Parent.Parent.Parent.Parent
button.MouseButton1Down:connect(function()
player.Character.Torso.CFrame = CFrame.new(game.Workspace.Block.Position)
end)

Change Position to CFrame and set the new CFrame using CFrame.new() and put inside the part you want the player to teleport to

Ad

Answer this question