I tried to make one, but it didn't work. So I came to ask for help, and here you guys are. So how do you make 2 players, like if you would say "Duel/", then type in a players name how would you make both players teleport to that area ON CLICK?
commands = { "duel/" } pos1 = Vector3.new(0,0,0) -- Where you want the chatter to go pos2 = Vector3.new(0,0,0) -- Where you want the other person to go game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) for i=1, #commands do if msg == string.lower(string.sub(commands[i], 1, string.len(commands[i]))) then if game.Players:findFirstChild(string.gsub(msg, commands[i], "")) then player.Character.Torso.CFrame = CFrame.new(pos1) game.Players[string.gsub(msg, commands[i], "")].Character.Torso.CFrame = CFrame.new(pos2) end end end end) end)
Edit: Added in the teleportation stuff.
Edit2: @Hippalectryon
Oops, your right. Forgot to add .Torso
Edit3: Sorry, I haven't used teleportation very much.
I'm adding to the above answer, you can achieve teleportation by CFraming the Torso as-well as using MoveTo, the chat method can be seen in the above answer. Example:
game.Workspace.Owenrules12.Torso.CFrame = game.Workspace.Part.CFrame
OR
game.Workspace.Owenrules12.Torso.CFrame = CFrame.new(5,5,5) -- X,Y,Z