Changing a Player to a Model

Hello, I’m wondering how I would be able to change a players character to a model. However, it needs to be changed with a script as the typical “StarterCharacter” wouldn’t allow me to change different players into different models as far as I am aware.

5 Likes

I think you could try:
player.Character = “MyModel”

But you may need to make sure it has a HumanoidRootPart and a humanoid in it.

Doesn’t seem to be working, but this error message is appearing in the output:

1 Like

try it in a regular script in serverscriptservice?

1 Like

If you want to change a player into a model, you would first of all have to decide if your character is R5 / R15, if you want the player to be a model by default, call the model “StarterCharacter” and put it into StarterPlayer. If you want to change the character by a script, insert a script into serverscriptservice and paste this code into it:

game.Players.PlayerAdded:Connect(function(player) -- The player has joined
     player.CharacterAdded:Connect(function(character) -- The character has been added
           wait() -- A wait function to give the script time to load everything in
           player. Character = model -- Change model to where your model is located
     end)
end)

Also, make sure to have a humanoidrootpart and a humanoid inside the model, those are required. If you also want the model to be able to move, add the other humanoid components into it (like arms, legs, etc).

Edit: I tested it and I would highly recommend having all the body parts into it, even if the character isn’t supposed to move, if the character isn’t supposed to move just set the humanoidrootpart to anchored

2 Likes

Seems to be working, but the camera is suspended in mid-air nowhere near where it is supposed to be.

then just set the camera subject to the model’s Humanoid

wait()
camera.CameraSubject = TestingBow.Humanoid
camera.CameraType = "Follow"

This is what I have tried doing, but it just doesn’t want to work for me.

Did you use the variable CurrentCamera?

This is bad practice. I recommend when the player joins, set their StarterCharacter to the model, then do player:LoadCharacter() to load the new character.

Also, using wait() to wait for things to load is a bad idea. Find another way to wait for things to load, such as repeat RunService.Heartbeat:wait() until game:IsLoaded() .

Also, I don’t recommend setting the camera type with a string, instead use Enums. So instead of “Follow”, use Enum.CameraType.Follow

1 Like

We are doing it so that the model we want can be changed, and so it isn’t a set model.

There are some errors in that that are causing the script not to work for some reason.

local TestingBow = game.Workspace.TestingBow
local camera = workspace.CurrentCamera

game.Players.PlayerAdded:Connect(function(player) 
	player.CharacterAdded:Connect(function(character) 
		repeat RunService.Heartbeat:wait() until game:IsLoaded()
		player. Character = TestingBow 
		camera.CameraSubject = TestingBow.Humanoid
		Enum.CameraType.Follow
	end)
end)

RunService is an unknown global, and Enum.CameraType.Follow has a missing function.

Wait why would you need to change the player character into a model in the first place, is there a special function that requires a player to be a model only?
Players are also loaded in the workspace as a model with a humanoid in it, why not try to use that instead?

the camera type is supposed to be custom for default behaviour, but i believe you know that and are trying out something else, just thought it would be nice to inform it though, in-case you didn’t know.

1 Like

For example; in car games, you want to be the car. You don’t want to be a person in the car. It’s the same concept here, because I’m trying to get it to be something that is not a roblox avatar.

uhhhh, with all due respect am pretty sure car games make you be the person IN the car with a a transparent character.

Yeah I can agree with this.
But what I believe he is trying to say is that the player needs to feel like you are the car in the game, ya know with controlling it.

yes! see the solution is not always changing the player into a car. So if he would better define what exactly he’s trying to do there may be better alternatives.

Duh, why did I not think of that?! I’ll try it out, thanks for pointing it out! Though would you be able to be one with the model in a sense, so when playing multiplayer you aren’t accidentally controlling everyone else’s bows?

1 Like