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

4 comments

0

Is there an error

0

nope

0

thats why its so hard to solve

0

From the looks of it, you could be saying their username incorrectly? Your admin is very case sensitive, one lowercase letter or missing letter could led to it not passing the if statements.