Ugh, CFrame ~= Vector3 is where mine fails, boi.
function onChatted(msg, speaker)
source = string.lower(speaker.Name)
msg = string.lower(msg)
if string.sub(msg, 1, 8):lower() == "teleport" then -- idk what to do here =c
pcall(function() speaker.Character.Torso.CFrame = CFrame.new(Vector3.new(string.sub(msg, 9))) end)
end
end
function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg) onChatted(msg, newPlayer) end)
end
game.Players.ChildAdded:connect(onPlayerEntered)
I think that would work. Bai. |