Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is it necessary to make a script work for both R6 and R15?

Lets say i want to make a decent game and i make a swimming animation, do i have to make 2 different swimming animations for both R6 and R15 rig types? I was thinking that it would be a lot easier if i could make a script that will change everyone's rig type to R15 when they enter the game and i'm not sure if that's possible.

if player.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
	Animation1:Play()
	
elseif player.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
	Animation2:Play()
end

This is what i've been doing, it works but it seems really inefficient because every time i have to reference something that's only available to one rig type such as their body parts, i have to use the if and elseif statements.

2 comments

0

The developer would set the rig type for the game in the settings but you can use both? It is just a little more work to code both in.

0

Oh i didn't notice lol thanks.

1 answer

✓ Accepted answer

It is possible to make your game only R15 or R6. It is very easy.

Follow the steps below:

  1. Open your game in Roblox Studio.

  2. Click on "Game Settings":

    https://gyazo.com/026e7575489f41a71bcd4acc792a073f

  3. After you have done that, a window will pop up. Click on the avatar tab on left top of window.

  4. Choose the avatar type. For me it shows unavailable but for you it will be available:

    https://gyazo.com/55f1d0cc266fe9245ef6d74160044eb7

If this answers your question then click on Accept Answer button!

This discussion is preserved as it was. New answers, comments, and votes are closed.