local script:
local player = game.Players.LocalPlayer local remoteEvent = game.ReplicatedStorage:WaitForChild("playertp") player.Chatted:Connect(function(msg) if msg:lower():match("goto") then local targetPlayer = game.Players:FindFirstChild(msg:sub(6)) if targetPlayer and targetPlayer.Character then player.Character.HumanoidRootPart.CFrame = CFrame.new(targetPlayer.Character.Head.Position) end elseif msg:lower():match("get") then local targetPlayer = game.Players:FindFirstChild(msg:sub(5)) if targetPlayer and targetPlayer.Character then remoteEvent:FireServer(targetPlayer.Character) end end end)
server script:
local remoteEvent = game.ReplicatedStorage:WaitForChild("playertp") remoteEvent.OnServerEvent:Connect(function(player, target) target.HumanoidRootPart.CFrame = CFrame.new(player.Character.Head.Position) end)
it is mean to teleport me to whoever i say when i say goto followed by the player name and teleport the player to me when i say get followed by the player name but its not anymore