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

What is wrong with this Morph Script?


game.Workspace.ChildAdded:connect(function(plr)
local name = plr.Name
local playerinplayers = game.Player:FindFirstChild(plr.Name)
if playerinplayers ~= nil then
    playerinplayers.CanLoadCharacterAppearance = false
    plr.Head.face.Texture = "rbxassetid://"
    local bodycolors = Instance.new("BodyColors", plr)
    bodycolors.RightArmColor = BrickColor.new("Pastel brown")
    bodycolors.LeftArmColor = BrickColor.new("Pastel brown")
    bodycolors.LeftLegColor = BrickColor.new("Dark stone grey")
    bodycolors.RightLegColor = BrickColor.new("Dark stone grey")
    bodycolors.TorseColor = BrickColor.Random()
    bodycolors.HeadColor = BrickColor.new("Pastel Brown")

end)

Can someone please inform me what is wrong with this? When I tested my world with this script, it entirely just did not work.

1 answer

✓ Accepted answer

In line 12 you misspelled torso, but here you go:

game.Workspace.ChildAdded:connect(function(plr)
local player = game.Players.LocalPlayer
local name = plr.Name
local playerinplayers = game.Players:FindFirstChild(plr.Name)
if playerinplayers ~= nil then
	playerinplayers.CanLoadCharacterAppearance = false
	plr.Head.face.Texture = "rbxassetid://"
	local bodycolors = Instance.new("BodyColors",plr)
	bodycolors.RightArmColor = BrickColor.new("Pastel brown")
	bodycolors.LeftArmColor = BrickColor.new("Pastel brown")
	bodycolors.LeftLegColor = BrickColor.new("Dark stone grey")
	bodycolors.RightLegColor = BrickColor.new("Dark stone grey")
	bodycolors.TorsoColor = BrickColor.Random()
	bodycolors.HeadColor = BrickColor.new("Pastel Brown")
end
	
	
	
	
	
end)

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