generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

My script not working

Previous Thread :: Next Thread 
creamyfudge_cake is not online. creamyfudge_cake
Joined: 26 Mar 2016
Total Posts: 1502
15 Jul 2016 07:31 AM
I done this and my helper bot shirt, pants or hat not loading.


"game.Workspace.ChildAdded:connect(function(player)
local name = player.Name
local playerinplayers = game.Players:FindFirstChild(player.Name)
if playerinplayers ~= nil then
playerinplayers.CanLoadCharacterAppearance = false
player.Head.face.Texture = ""
player.Head.Transparency = 0.99 -- Headless Head
local bodycolors = Instance.new("BodyColors", player) -- Inserts BodyColors in your character. Customize it if you want.
bodycolors.TorsoColor = BrickColor.new("Pastel brown")
bodycolors.RightArmColor = BrickColor.new("Pastel brown")
bodycolors.LeftArmColor = BrickColor.new("Pastel brown")
bodycolors.HeadColor = BrickColor.new("Pastel brown")
bodycolors.LeftLegColor = BrickColor.new("Pastel brown")
bodycolors.RightLegColor = BrickColor.new("Pastel brown")
local shirt = Instance.new("Shirt", player) -- Creates shirt in your shirt.
shirt.ShirtTemplate = "rbxassetid://162818755"
local pants = Instance.new("Pants", player)
pants.PantsTemplate = "rbxassetid://454845547"
local hat = Instance.new("Hat", player)
hat.Name = "Mr.Robot"
hat.AttachmentForward = Vector3.new(0, 0, -1) -- All the hat.Attachments lines are the "position" you want it at when on your head
hat.AttachmentPos = Vector3.new(0, 0.4, 0)
hat.AttachmentRight = Vector3.new(1, 0, 0)
hat.AttachmentUp = Vector3.new(0, 1, 0)
local part = Instance.new("Part", hat)
part.Name = "Handle"
part.Size = Vector3.new(2,2,2)
local mesh = Instance.new("SpecialMesh", part)
mesh.MeshId = "rbxassetid://16179349"
mesh.TextureId = "rbxassetid://16179349"
end
end)


"


Help
Report Abuse
creamyfudge_cake is not online. creamyfudge_cake
Joined: 26 Mar 2016
Total Posts: 1502
15 Jul 2016 07:34 AM
I got the shirt and pants now on and its working.

But I dont get how the head works.
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
15 Jul 2016 08:07 AM
Objects_To_Delete = {
'Shirt',
'Pants',
'Hat',
'NewOddHatName',--Forgot new hat names.
'BodyColors'
}
function check(array, input)
for i,v in pairs(array) do
if v == input then
return true
end
end
return false
end

game.Players.PlayerChildAdded:connect(function(p)
p.CanLoadCharacterAppearance = false
p.CharacterAdded:connect(function(c)
for i,v in pairs(c:GetChildren()) do--You don't necessarily need this but here it is. :P
if check(Objects_To_Delete, c.ClassName) then
v:Destroy()
end
end
local bodycolors = Instance.new('BodyColors', c)
local color = BrickColor.new'Pastel brown'
bodycolors.TorsoColor = color
bodycolors.RightArmColor = color
bodycolors.LeftArmColor = color
bodycolors.HeadColor = color
bodycolors.LeftLegColor = color
bodycolors.RightLegColor = color

local shirt = Instance.new('Shirt', c)
shirt.ShirtTemplate = 'rbxassetid://162818755'
local pants = Instance.new('Pants', c)
pants.PantsTemplate = 'rbxassetid://454845547'

local hat = Instance.new'Hat'
hat.Name = 'Mr.Robot'
hat.AttachmentForward = Vector3.new(0, 0, -1)
hat.AttachmentPos = Vector3.new(0, 0.4, 0)
hat.AttachmentRight = Vector3.new(1, 0, 0)
hat.AttachmentUp = Vector3.new(0, 1, 0)

local part = Instance.new('Part', hat)
part.Name = 'Handle'
part.Size = Vector3.new(2,2,2)

local mesh = Instance.new('SpecialMesh', part)
mesh.MeshId = 'rbxassetid://16179349'
mesh.TextureId = 'rbxassetid://16179349'

hat.Parent = c
end)
end)


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image