local player = game.Players.LocalPlayer local remoteEvent = game.ReplicatedStorage:WaitForChild("playertp") player.Chatted:Connect(function(msg) if msg:lower():match("tp") then if game.Players:FindFirstChild(msg:sub(4)) then local target = game.Players:FindFirstChild(msg:sub(4)) print(target.Name) player.Character.HumanoidRootPart.CFrame = CFrame.new(target.Character.Head.Position) end end end)
nothing printed and no errors, none of my teleportation chat commands work anymore but why. and yes this is a local script
local player = game.Players.LocalPlayer
player.Chatted:Connect(function(msg)
if msg:sub(1,2):lower():match("tp") then
print(msg:sub(3)) if game.Players:FindFirstChild(msg:sub(4)) then
local target = game.Players:FindFirstChild(msg:sub(4))
print(target.Name)
player.Character.HumanoidRootPart.CFrame = CFrame.new(target.Character.Head.Position)
end
end
end) You messed something up.