Switching from R15 to R6 midgame

How would one go about making a “switch pad”, a pad that when your character steps on it, it sets your character’s RigType to R6? I know theres more than just changing the rig type and I was wondering what else there was to do since nothing I could find on here was simple enough or compatible for what I’m looking for.

2 Likes

I think you could probably have two different rigs in your game, an R6 and R15. When a player steps on the pad, you can create a new instance of which ever rig should be made, and then assign the player’s Character property to that. Just might have to update the appearance of the rig to match what the player’s wearing.

3 Likes

Alright, where’s the Character property? I’m looking through Humanoid

It’s a property of the Player object.

So:

game.Players.estonice2.Character = pathToNewRigThatWasCloned

Thanks! I’m new to this, does the new rig have to have all the scripts and whatnot that a normal character has upon spawning? or do they automatically get put in

–From R6 to R15:

for _,plr in pairs(PLAYERS:GetChildren()) do
			if plr.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
				local Main = game.Players:GetHumanoidDescriptionFromUserId(plr.CharacterAppearanceId)
				local morph = game.Players:CreateHumanoidModelFromDescription(Main, Enum.HumanoidRigType.R15)
				morph:SetPrimaryPartCFrame(plr.Character.PrimaryPart.CFrame)
				morph.Name = plr.Name
				plr.Character = morph
				morph.Parent = workspace	
			end
		end

–From R15 to R6:

for _,plr in pairs(PLAYERS:GetChildren()) do
			if plr.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
				local Main = game.Players:GetHumanoidDescriptionFromUserId(plr.CharacterAppearanceId)
				local morph = game.Players:CreateHumanoidModelFromDescription(Main, Enum.HumanoidRigType.R6)
				morph:SetPrimaryPartCFrame(plr.Character.PrimaryPart.CFrame)
				morph.Name = plr.Name
				plr.Character = morph
				morph.Parent = workspace	
			end
		end
8 Likes

I don’t believe that you do. Roblox CoreScripts internally handle user control of the character that they’re set to (assuming it’s rigged properly)

Thanks! Few questions:

Is the “PLAYERS” a variable? I tried making it a variable to game.Players

How exactly would this be used? I put it in a script inside a part.


local PLAYERS = game.Players



for _,plr in pairs(PLAYERS.uintah50) do
	if plr.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
		local Main = PLAYERS.uintah50:GetHumanoidDescriptionFromUserId(plr.CharacterAppearanceId)
		local morph = PLAYERS.uintah50:CreateHumanoidModelFromDescription(Main, Enum.HumanoidRigType.R6)
		morph:SetPrimaryPartCFrame(plr.Character.PrimaryPart.CFrame)
		morph.Name = plr.Name
		plr.Character = morph
		morph.Parent = workspace	
	end
end
type or paste code here

Make PLAYERS as a variable of the players in your game

local PLAYERS = game.Players:GetPlayers()



for _,plr in pairs(PLAYERS) do
	if plr.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
		local Main = PLAYERS.uintah50:GetHumanoidDescriptionFromUserId(plr.CharacterAppearanceId)
		local morph = PLAYERS.uintah50:CreateHumanoidModelFromDescription(Main, Enum.HumanoidRigType.R6)
		morph:SetPrimaryPartCFrame(plr.Character.PrimaryPart.CFrame)
		morph.Name = plr.Name
		plr.Character = morph
		morph.Parent = workspace	
	end
end

Could you show an example of how you would set this up in studio? Not getting any errors, so i’m confused on how I should set it up. I have game settings set to R15 and i 'm running the game to see if it changes my avatar to R6 as the first test, but nothing happens

I use this for admin commands,

If you wanted to see an effect,
you could insert a ui button [text button], and add a local script into it,
and copy and paste this code into it :

local plr= game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
  if plr.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
		local Main = PLAYERS.uintah50:GetHumanoidDescriptionFromUserId(plr.CharacterAppearanceId)
		local morph = PLAYERS.uintah50:CreateHumanoidModelFromDescription(Main, Enum.HumanoidRigType.R6)
		morph:SetPrimaryPartCFrame(plr.Character.PrimaryPart.CFrame)
		morph.Name = plr.Name
		plr.Character = morph
		morph.Parent = workspace	
	end
end)

how it work when we called is??

This can let you simply convert from R6 to R15 and same for opposite way.

1 Like