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

3 comments
just wondering, whats the point of having a remoteEvent, if you never use it in the script
Chat should be managed from the server
i use the remoteevent, i just didnt show what it does in this script but its there and chat has worked before from the client