Teleportation menu for admin commands

Hello everyone!

I want to ask you something about scripting. I only do a few small scripts and some rather difficult tweens. But here’s what I tried, but it didn’t work.
I want to have another thing in my admin panel: I already wrote a script to make these menus work:

Now I want to create two categories in the top scrolling frame: one called “Teleport to” and another called “Teleport player to me”. But I don’t know how to do that. Can you help me with this?
So that then you just see the players name and then click them to get to the person or bring the person to you. It would also be helpful to have the option to bring all players to me.

Sincerely

CSJeverything

1 Like

Here is more of my game’s ui if you are interested: Feedback on obby UI

1 Like

Player.Character:PivotTo(OtherPlayer.Character:GetPivot())

1 Like

You can also do:

Local Player2_coords = Player2.Character:GetPrimaryPartCFrame() * CFrame.new(Vector3.new(5, 0, 5))
Player.Character:SetPrimaryPartCFrame(Player2_coords)

Which will teleport the player at the direct other players coordinates but also 5 studs away, so their not directly on top of eachother.

1 Like

Dude, use PivotTo() and GetPivot()! Primary part CFrame is getting deprecated!!!

Also, by default, The primary parts CFrame is the pivot.

1 Like

Following what he said, I will do the same thing but with 5 studs out.

Player.Character:PivotTo(OtherPlayer.Character:GetPivot() * CFrame.new(Vector3.new(5, 0, 5)))

1 Like