-- ScriptsCodes | Roblox Studio Luau utility -- Run: Open your own place in Roblox Studio, choose View > Command Bar, paste this file, and press Enter. -- Output: Results appear in the Studio Output window. Edit the sample values before running. -- Movement Fundamentals: normalize a 2D direction vector local function normalize(x, y) local magnitude = math.sqrt(x * x + y * y) if magnitude == 0 then return 0, 0 end return x / magnitude, y / magnitude end local x, y = normalize(3, 4) print(string.format("Direction: %.2f, %.2f", x, y))