How would I script a character to have abilities?

So, I’m trying to make a game where you choose a character to fight other players with that has abilities unique to that character, similar to how a UTG (Ultimate Trolling Gui) works: You choose a command with a character, and it turns you into that character. I cannot find anything to help me with this and I have tried every way that I can find to figure this out. I am a beginner to scripting and that is probably why I am having so much trouble with something that is probably extremely simple.

1 Like

To change a player’s character into a certain character, you can first say something like:

local newCharacter = game.ServerStorage.Characters.CharacterName

In this case, the character you would be getting is inside a folder named Characters inside of ServerStorage. The CharacterName would be the name of the character inside that folder.

To place the character into the workspace you would say:

local newCharacterClone = newCharacter:Clone()
newCharacterClone.Parent = workspace

You would then get the player you want to transform into the chosen player by saying something like:

local player = game.Players.PlayerName
local playerCharacter = player.Character

Then you can say:

playerCharacter = newCharacterClone

This will set the player’s character to the character assigned in the newCharacterClone variable. Make sure the character assigned to this variable has archivable on, or it will not work.

3 Likes

This isn’t what I mean, I want to figure out how to make a character that has abilities unique to itself.

Edit: This could actually help me a lot Since I figures out What I need to do for the abilities! Thanks!

1 Like