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

Teleporting to a Place with a Tool?

How do I make a tool in the player’s inventory teleport them to another place?

1 answer

This will teleport the player somewhere when they hold the tool. Put this in a localscript in your tool:

local tool = script.Parent

local playername = game.Players.LocalPlayer.Name

local player = game.Players.LocalPlayer

tool.Equipped:Connect(function()
	print("tool equiped")
	player.Character.PrimaryPart = player.Character.Torso
	player.Character:SetPrimaryPartCFrame(CFrame.new(X,Y,Z))
end)

set x y and z to the position you want

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