I have recently been making this script. It needs to teleport the player to a certain position however it doesn´t work.
script.Parent.MouseClick:Connect(function() local Pos = script.Parent.Parent.Parent.TeleportingBlock2 game.StarterPlayer.StarterCharacter:MoveTo(Pos.Position) end)
Your script doesn't work because it's not moving the character.
StarterCharacter is a folder for objects to be placed inside of the actual character when it's loaded.
your actual movement command should look something like
game.Players.LocalPlayer.Character:MoveTo(Pos.Position)
Now, I must warn you that may act weird with replication, but this should get you on the right track.
The reason is that TeleportingBlock2 is an object. You need to get the position, to teleport to. Then you should use SetPrimaryPartCFrame()
script.Parent.MouseClick:Connect(function() local Position = script.Parent.Parent.Parent.TeleportingBlock2.Position game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(Position) end)