So I tried to make a fly script for my admin commands system and I got this error
Heres my code:
elseif args[1] == "fly" then
if Players:FindFirstChild(args[2]) then
local Player = Players:FindFirstChild(args[2])
local Mouse = Player:GetMouse()
local Character = Player.Character
local Head = Character:WaitForChild("Head")
local BodyVel = Instance.new("BodyVelocity",Head)
BodyVel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
BodyVel.Velocity = Mouse.Hit.lookVector * 100
end
else
commandFailed(player)
end
end