Hello! For some reason my commands don’t work anymore. I just made some minor changes (CFraming)
and it looks like my script broke because of them.
My script:
plr.Chatted:Connect(function(msg)
local splits = msg:split(" ")
local name = splits[2]
if splits[1]:lower() == MRCommands["Bring-Command"] and plr.leaderstats.Rank.Value >= 5 then
for i,v in pairs(game.Players:GetChildren()) do
if v.Name:sub(1, name:len()):lower() == name:lower() then
--v is the correct player
local vHumRootPart = v.Character:FindFirstChild("HumanoidRootPart")
local myHumRootPart = plr.Character:FindFirstChild("HumanoidRootPart")
print("Yes")
vHumRootPart.CFrame = myHumRootPart.CFrame * CFrame.new(0, 0, -10)
end
end
end