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

How do you teleport a player to a brick?

I want to make a thing so if a certain player says a command it teleports the specified player to the specified model anybody know how?

1 comment

1

function onTouch(hit) local p = game.Players:GetPlayerFromCharacter(hit.Parent) if p ~= nil then p.Character.Humanoid.Torso.CFrame = CFrame.new(1199.25, 7.5, 93.25) end end script.Parent.Touched:connect(onTouch)

1 answer

✓ Accepted answer
 local function Run ( ChatService, player )
	 local function createPart ( speakerName , message , channelName )
		 if string.sub ( message , 1 , 5 ) == "teleport" then
			 local newPart = Instance.new ( "Part" )
			 newPart.Parent = game.Workspace
			 player.Character.HumanoidRootPart.CFrame = CFrame.new(newPart.Position.CFrame)
		 end
		 return false
	 end

	 ChatService : RegisterProcessCommandsFunction ( "createPart" , createPart )
 end

 return Run 

I'm pretty sure that this will work.

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