✓ Accepted answer
SHORT ANSWER: Upon entering the server, you could redefine the Character property in the Player instance.
LONG ANSWER: There are some guidelines you may need to follow to make a functional Character object.
SCRIPT
- You need a server script with
.PlayerAdded and .CharacterAdded, because this will be the fundamental element to transform the Character object.
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
end)
end)
- I've seen scripts where it does the transformation itself (i.e. re-positions and re-sizes the body parts for you), but I find it easier to make a base model for the Character object first and store it somewhere (ideally,
game.ServerStorage).
CHARACTER
As mentioned before, store the Character object in a storage instance (skip this if you're just going to create a script for the transformation). Anchor all of the parts.
In order to sustain the life of your Character object, a head/torso MUST be connected (Motor6D) and a HumanoidRootPart MUST be present. Refer to the default Robloxian Character object and see where the Motor6D joint objects connect to.
In my experience, keeping a Humanoid object in the Character object in Studio never worked out, as I keep dying. So in your script, create a new Humanoid object onto the Character.
Now all you have to do is make a spawn point for your character (with CFrame), rename the Character object every time it spawns, and then you're pretty much done.
This is how you redefine a Character object, add the Humanoid object in, and rename your character:
newCharacter = game.ServerStorage.YourCharacterObject:Clone()
newCharacter.Parent = workspace
newCharacter.Name = Player.Name
Player.Character = newCharacter
Humanoid = Instance.new("Humanoid", newCharacter)
newCharacter.Archivable = false
7 comments
What's your script so far?
Here is the script. http://i.imgur.com/Rlvyeye.png
Did you set your Part0 and Part1 to the corresponding body parts as shown in the default Robloxian character object? There's DaMrNelson's plugin to do that.
What is DrNelson's plugin?
This is what I'm referring to: http://www.roblox.com/Character-Creator-BETA-item?id=171922549
It works i finally got it to work thanks sooooooooo much :D your the best!
You're welcome. :D