You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want my fling command to actually work, instead of erroring all the time -
What is the issue? Include screenshots / videos if possible!
This chunk here:
elseif Command == "J:Fling" then
local Target = ArgsTable[2]
if Target == "all" then
for indexPlayer, Player in pairs(game.Players:GetPlayers()) do
local Character = Player.Character
if Character then
local HRP = Character:WaitForChild("HumanoidRootPart")
HRP.Velocity = Vector3.new(0, tonumber(ArgsTable[3], 0))
end
end
else
local Found_Player = MainModule.FindClosestMatchString("PlayerSearch", game.Players:GetPlayers(), Target)
if Found_Player then
local Character = Found_Player.Character
if Character then
local HRP = Character:WaitForChild("HumanoidRootPart")
HRP.Velocity = Vector3.new(0, tonumber(ArgsTable[3], 0))
end
end
end
Is causing the error in the title
I’m not sure why tonumber is failing, it never does this