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

How can I change a character like how they do in piggy with the equipping system?

LocalScript: local services = {

["replicatedStorage"] = game:GetService("ReplicatedStorage")

}

local PlayerService = game:GetService("Players")

local player = PlayerService.LocalPlayer

local Q = Enum.KeyCode.Q

local UIS = game:GetService("UserInputService")

local event = services.replicatedStorage:WaitForChild("CharacterChange",2)

local character = services.replicatedStorage:WaitForChild("StarterCharacter",2)

UIS.InputBegan:Connect(function(key)

if key.KeyCode == Q and character then

	event:FireServer(player)

	character.Parent = game.StarterPlayer

	player.Character = game.StarterPlayer:WaitForChild("Character")

end

end)

Regular Script:

game.ReplicatedStorage.CharacterChange.OnServerEvent:Connect(function(player)

player:LoadCharacter()

end)

1 answer

If anyone has this problem, it's because you have to add the skin/character from the server. If you do it on the client(i.e LocalScript) then it won't change at all.

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