RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Make me a script it tells me the best power I should use for the football."
-- local script local function calculateBestPower() local player = game.Players.LocalPlayer local ball = game.Workspace.Football local distanceToBall = (player.Character.HumanoidRootPart.Position - ball.Position).Magnitude local bestPower if distanceToBall <= 10 then bestPower = 20 elseif distanceToBall <= 25 then bestPower = 40 elseif distanceToBall <= 50 then bestPower = 60 else bestPower = 80 end return bestPower end local bestPower = calculateBestPower() print("The best power to use for the football is: " .. bestPower)