Diagnostics & Utilities2 min read

Writing R6 & R15 Compatible Server ScriptsWrite once so your Luau runs in both classic R6 and modern R15 lobbies.

A script that looks for character.Torso crashes in R15 games, while UpperTorso crashes in R6 games. Two tiny habits make your server scripts work in both automatically.

Target HumanoidRootPart and Humanoid first

Both R6 and R15 avatars share HumanoidRootPart, Head, and Humanoid. When attaching effects, lights, or positioning props, reference HumanoidRootPart so your script never breaks when switching games.

rig-safe.lua
local function getAnchor(character)
    return character:FindFirstChild("HumanoidRootPart")
        or character:FindFirstChild("Torso")
        or character:FindFirstChild("UpperTorso")
end

Common questions

How can I check if a character is R6 or R15 in Luau?

Inspect humanoid.RigType == Enum.HumanoidRigType.R6 or Enum.HumanoidRigType.R15.

All scripts

Try Nova free right in your browser.

Create a free account, link your Roblox profile in about a minute, and run verified or custom Luau scripts with zero downloads. Upgrade to Basic, Enhanced, or Ultra anytime with one-time card checkout.