wait(5)
local num = 4 -- Number of bots
local coef = -1
local wed=false
local invwed = false
local rotate = false
local rotate1 = 0
local zigzag = false
local sfl = false
script.Parent.Humanoid.AutoRotate=true
--local function chat(msg)
-- game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(msg,"All")
--end
game.Players.iSyriux.Character.Humanoid.Jumping:Connect(function()
script.Parent.Humanoid.Jump=true
end)
game.Players.iSyriux.Chatted:Connect(function(msg)
if string.lower(msg)==".wedge formation" then
wed = true
invwed = false
zigzag = false
sfl = false
end
if string.lower(msg)==".line formation" then
wed = false
zigzag = false
sfl = false
end
if string.lower(msg)==".inverse wedge formation" then
wed = true
invwed = true
zigzag = false
sfl = false
end
if string.lower(msg)==".circle around me" then
rotate = true
end
if string.lower(msg)==".stop circling around me" then
rotate = false
end
if string.lower(msg)==".zigzag formation" then
zigzag = true
sfl = false
end
if string.lower(msg)==".sfl" then
sfl = true
end
end)
while wait() do
local ars=0
local er = math.random(1,100)
if er==50 then
--chat(".")
end
if wed==true then
ars = -coef*2
end
if invwed==true then
ars = -math.abs(ars)
else
ars = math.abs(ars)
end
if zigzag==true then
if math.abs(coef)%2==0 then
ars = 1
else
ars = -1
end
end
local zag = 0
if coef<0 then
zag = num
end
script.Parent.Humanoid.AutoJumpEnabled=true
script.Parent.Humanoid.WalkSpeed=game.Players.iSyriux.Character.Humanoid.WalkSpeed
script.Parent.Humanoid.JumpPower=game.Players.iSyriux.Character.Humanoid.JumpPower
if rotate==false then
if sfl==false then
script.Parent.Humanoid:MoveTo((game.Players.iSyriux.Character.HumanoidRootPart.CFrame+game.Players.iSyriux.Character.HumanoidRootPart.CFrame.RightVector*5*coef-game.Players.iSyriux.Character.HumanoidRootPart.CFrame.LookVector*ars*2).Position)
else
print(game.Players.iSyriux.Character.HumanoidRootPart.CFrame)
print(game.Players.iSyriux.Character.HumanoidRootPart.CFrame.LookVector)
print((math.abs(coef)*3)+zag)
print()
print(game.Players.iSyriux.Character.HumanoidRootPart.CFrame-game.Players.iSyriux.Character.HumanoidRootPart.CFrame.LookVector)
print(game.Players.iSyriux.Character.HumanoidRootPart.CFrame.LookVector*(math.abs(coef)*3)+zag)
print(game.Players.iSyriux.Character.HumanoidRootPart.CFrame-game.Players.iSyriux.Character.HumanoidRootPart.CFrame.LookVector*(math.abs(coef)*3)+zag)
script.Parent.Humanoid:MoveTo((game.Players.iSyriux.Character.HumanoidRootPart.CFrame-game.Players.iSyriux.Character.HumanoidRootPart.CFrame.LookVector*(math.abs(coef)*3)+zag).Position)
end
else
if rotate1>=360 then
rotate1=0
else
rotate1=rotate1+5
end
local sag = Instance.new("Part",workspace)
sag.Anchored=true
sag.CanCollide=false
sag.Position=game.Players.iSyriux.Character.HumanoidRootPart.Position
sag.Orientation=Vector3.new(0,rotate1,0)
script.Parent.Humanoid:MoveTo((sag.CFrame+sag.CFrame.RightVector*5*coef-sag.CFrame.LookVector*ars*2).Position)
sag:Destroy()
end
end
Okay, this is the script. This is where I want you to focus on
print(game.Players.iSyriux.Character.HumanoidRootPart.CFrame)
print(game.Players.iSyriux.Character.HumanoidRootPart.CFrame.LookVector)
print((math.abs(coef)*3)+zag)
print()
print(game.Players.iSyriux.Character.HumanoidRootPart.CFrame-game.Players.iSyriux.Character.HumanoidRootPart.CFrame.LookVector)
print(game.Players.iSyriux.Character.HumanoidRootPart.CFrame.LookVector*(math.abs(coef)*3)+zag)
print(game.Players.iSyriux.Character.HumanoidRootPart.CFrame-game.Players.iSyriux.Character.HumanoidRootPart.CFrame.LookVector*(math.abs(coef)*3)+zag)
script.Parent.Humanoid:MoveTo((game.Players.iSyriux.Character.HumanoidRootPart.CFrame-game.Players.iSyriux.Character.HumanoidRootPart.CFrame.LookVector*(math.abs(coef)*3)+zag).Position)
You can multiply lookvectors by numbers. CFrame
However, on this particular line, multiplying it by a number doesn’t work!