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

How to make this keep character packages? [UNSOLVED]

For some reason, this script I made doesn't keep the character packages. It has the default ROBLOX 1.0 body parts, and I want it to load any body package the player might be using. It's a First Person Body script, by the way. Currently, I have it set to only render the legs in first person.

--[[
	(C)2015 Blazing games inc.
Original Programmer: fireking100489
]]

vis = false
larm = nil
rarm = nil 
tor = nil
lleg = nil
rleg = nil
mod = nil
Camera = game.Workspace.CurrentCamera
if Camera:FindFirstChild("CamBodyMod") then
	Camera.CamBodyMod:Destroy()
end 
local player = game.Players.localPlayer
repeat wait() until player.Character
wait(3)
if player ~= nil then
	mod = Instance.new("Model")
	local hum = Instance.new("Humanoid") 
	local s = Instance.new("Shirt")
	local p = Instance.new("Pants")
	mod.Name = "CamBodyMod"
	mod.Parent = Camera
	hum.Parent = mod
	s.Name = "Shirt"
	s.Parent = mod
	p.Name = "Pants"
	p.Parent = mod
	rleg = player.Character:FindFirstChild("Right Leg"):clone()
	lleg = player.Character:FindFirstChild("Left Leg"):clone()

	rleg.Parent = mod
	lleg.Parent = mod
	rleg.TopSurface = "Smooth"
	lleg.TopSurface = "Smooth"
	rleg.BottomSurface = "Smooth"
	lleg.BottomSurface = "Smooth"
	if script.LegsTransparent.Value == true then
		rleg.Transparency = 0
		lleg.Transparency = 0
	end
	
	weld = Instance.new("Weld",player.Character:FindFirstChild("Right Leg"))
	weld.Part0 = player.Character:FindFirstChild("Right Leg")
	weld.Part1 = rleg
	
	welda = Instance.new("Weld",player.Character:FindFirstChild("Left Leg"))
	welda.Part0 = player.Character:FindFirstChild("Left Leg")
	welda.Part1 = lleg
	
	vis = true
	while true do
		wait()
		if player.Character:FindFirstChild("Shirt") then
			s.ShirtTemplate = player.Character.Shirt.ShirtTemplate
		end
		if player.Character:FindFirstChild("Pants") then
			p.PantsTemplate = player.Character.Pants.PantsTemplate
		end
	end
end

1 answer

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