I have this current code
function ClickedCourse1() Course1.Visible = false Course2.Visible = false Course3.Visible = false CourseSelect.Visible = false end
Basically when I click a button it disables all the GUI's but I always want it to teleport the player to a block named Course1Tele I just want to know the simple command on how to do this, thanks!
You can either change the CFrame of a character's torso, or use the MoveTo() method on the character model itself. Of course, you have to have a way to get the character.
character:MoveTo(workspace.Course1Tele.Position)
character.Torso.CFrame = CFrame.new(workspace.Course1Tele.Position)
With .MouseButton1Down Event or A LocalPlayer (if your script is a LocalScript) all you gotta do is locate the Character's Torso from the player and change its CFrame equalized to the block's CFrame.
local Brick=Workspace.Part function Teleport(player) if player.Character:FindFirstChild("Torso") then player.Character.Torso.CFrame=Brick.CFrame --Model:MoveTo(x,y,z) can do this too, but I prefer it this way. --If you want the player to stand on the brick this is how you'd do it (I think.): player.Character.Torso.CFrame=Brick.CFrame*CFrame.new(0,Brick.Size.Y,0) end script.Parent.MouseButton1Down:connect(Teleport(player))