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 » Scripting Helpers
Home Search
 

Re: Class Script

Previous Thread :: Next Thread 
GregorSamsa is not online. GregorSamsa
Joined: 02 Jun 2012
Total Posts: 68
17 Sep 2012 07:52 PM
It works perfectly fine in Visit and Solo mode but not Online, so it is difficult to get output. I'm sure the error is glaring at us right now.

Also if you don't know how to fix it but you can make a script that does the exact same thing, please post it.


This is in a TextButton, which is in an ImageLabel, which is in another ImageLabel, which is in a ScreenGui, which is in the PlayerGui, which is in the Player.

--[[instructions
put character stuff in button
]]

local button = script.Parent
local stuff = button:getChildren()
local page = button.Parent
local bank = page.Parent
local book = bank.Parent
local player = book.Parent.Parent
local character = player.Character
local removeable = character:getChildren()

function give()
--remove old character
for jk = 1, #removeable do
if removeable[jk].ClassName == "Script" or removeable[jk].ClassName == "LocalScript" or removeable[jk].ClassName == "Humanoid" or removeable[jk].ClassName == "Part" then
print(removeable[jk])
else
removeable[jk]:remove()
end
end
--give new character and weapons
for i = 1, #stuff do
if stuff[i].ClassName == "Tool" or stuff[i].ClassName == "HopperBin" then
stuff[i].Parent = player.Backpack
elseif stuff[i].ClassName == "CharacterMesh" or stuff[i].ClassName == "Shirt" or stuff[i].ClassName == "Pants" or stuff[i].ClassName == "BodyColors" then
stuff[i].Parent = character
elseif stuff[i].ClassName == "Part" or stuff[i].ClassName == "WedgePart" or stuff[i].ClassName == "CornerWedgePart" then
stuff[i].Parent = character
local W = Instance.new("Weld")
W.Part0 = stuff[i]
W.Part1 = character:findFirstChild(stuff[i].bodypart.Value)
W.C0 = CFrame.new(stuff[i].cframe.Value) * CFrame.Angles(stuff[i].cframerx.Value, stuff[i].cframery.Value, stuff[i].cframerz.Value)
stuff[i].Position = character:findFirstChild(stuff[i].bodypart.Value).Position
W.Parent = stuff[i]
elseif stuff[i].ClassName == "SpecialMesh" or stuff[i].ClassName == "BlockMesh" or stuff[i].ClassName == "CylinderMesh" or stuff[i].ClassName == "Sound" or stuff[i].ClassName == "Smoke" or stuff[i].ClassName == "Fire" or stuff[i].ClassName == "Sparkles" or stuff[i].ClassName == "BillboardGui" then
stuff[i].Parent = character:findFirstChild(stuff[i].bodypart.Value)
elseif stuff[i].ClassName == "Script" or stuff[i].ClassName == "LocalScript" or stuff[i].ClassName == "ForceField" then
if stuff[i].Name ~= "getstuff" then
if stuff[i].parental.Value == "Character" then
stuff[i].Parent = character
else stuff[i].Parent = character:findFirstChild(stuff[i].parental.Value)
end
end
end
end
book:remove()
end


button.MouseButton1Click:connect(give)
Report Abuse
moeman987 is not online. moeman987
Joined: 20 May 2011
Total Posts: 1408
17 Sep 2012 07:56 PM
Looks perfect?

-moeman987
Report Abuse
GregorSamsa is not online. GregorSamsa
Joined: 02 Jun 2012
Total Posts: 68
17 Sep 2012 08:01 PM
Yes, but it still doesn't work. You can test it out in a place if you want to see it not work. Set up the GUIs how I specified and put a sword or random tool in it.
Report Abuse
moeman987 is not online. moeman987
Joined: 20 May 2011
Total Posts: 1408
17 Sep 2012 08:03 PM
I don't know what to tell you.
Iv'e attemted the same script several times and it worked.
Just i don't need it.
Report Abuse
GregorSamsa is not online. GregorSamsa
Joined: 02 Jun 2012
Total Posts: 68
18 Sep 2012 03:07 PM
Did it work in online mode?
Report Abuse
GregorSamsa is not online. GregorSamsa
Joined: 02 Jun 2012
Total Posts: 68
18 Sep 2012 03:11 PM
It seems to be working now, with no modifications... Maybe the glitch is Absent-Minded Scripter Syndrome
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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