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

How do I teleport a player to an island via text box?

-- Teleport Blocks
local taiga = game.Workspace.Map.Islands.TeleportParts.TeleportPartTaiga
local solar = game.Workspace.Map.Islands.TeleportParts.TeleportPartSolar
local wilderness1 = game.Workspace.Map.Islands.TeleportParts.TeleportPartWilderness1

local player = game.Players.LocalPlayer
local char = player.Character
local humrootpart = player.HumanoidRootPart

script.Parent.FocusLost:Connect(function(enter)
	if enter then
		local Input = script.Parent.Text
		if string.lower(Input) == "blasting taiga" then
			humrootpart.CFrame = CFrame.new()
		end
	end
end)

1 comment

0

Can you elaborate more please

1 answer

✓ Accepted answer

The code kinda had some problems. I don't understand what 'wilderness1' is for tho.

local taiga = game.Workspace.Map.Islands.TeleportParts.TeleportPartTaiga
local solar = game.Workspace.Map.Islands.TeleportParts.TeleportPartSolar
local wilderness1 = game.Workspace.Map.Islands.TeleportParts.TeleportPartWilderness1
script.Parent.FocusLost:Connect(function(enter)
	local player = game.Players.LocalPlayer
	local char = player.Character
	local humrootpart = char.HumanoidRootPart
	if enter then
		local Input = script.Parent.Text
		if string.lower(Input) == "blasting taiga" then
			humrootpart.CFrame = taiga.CFrame
		end
	end
end)

1 comment

0

Thanks! Also wilderness 1 was for an island it's just a variable for it

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