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
 

Doesn't clone,,

Previous Thread :: Next Thread 
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 07:03 PM
So I have the script that clones the backpacks to lighting.

game.Players.PlayerAdded:connect(function(p)
local back = Instance.new("Backpack", game.Lighting)
back.Name = p.Name
local c = Instance.new("Backpack", back)
c.Name = "CurrentCharacter"
lcoal s = game.ServerScriptService.Character:Clone()
s.Parent = back
s.Disabled = false
end)

That works perfectly.
Now in the script called Character there is this.
s = script.Parent.CurrentCharacter:FindFirstChild("CreateCharacter")
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
check = p:WaitForChild("Backpack")
if check:FindFirstChild("CreateCharacter") then
check.CreateCharacter:Destroy()
repeat wait() until check.CreateCharacter == nil
end
if s ~= nil then
local ch = s:Clone()
ch.Parent = check
ch.Disabled = false
end
end)
end)

This doesn't function as I wanted it to.
It's suppose to do this:

1. Check if in the player's backpack check if there is a script called "CreateCharacter"
2. If that ~=nil then, Destroy() it.
3. Once that's done, clone a new one.
4. If CreateCharacter was nil then, skip to cloning a new one.
5. The createcharacter will be cloned to the player's backpack, and set disabled to false.

I have no idea what's wrong..
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 07:39 PM
Bump
Report Abuse
drslicendice is not online. drslicendice
Joined: 05 Mar 2011
Total Posts: 18737
18 Jun 2014 07:46 PM
lcoal s = game.ServerScriptService.Character:Clone()

lcoal

LCOAL


LCOALL?!?!?
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 07:48 PM
...
Report Abuse
drslicendice is not online. drslicendice
Joined: 05 Mar 2011
Total Posts: 18737
18 Jun 2014 07:48 PM
BWHAHAHAHA
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 07:49 PM
Ermm
Report Abuse
drslicendice is not online. drslicendice
Joined: 05 Mar 2011
Total Posts: 18737
18 Jun 2014 07:49 PM
what
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 07:51 PM
Nothing, your just weird.
Report Abuse
drslicendice is not online. drslicendice
Joined: 05 Mar 2011
Total Posts: 18737
18 Jun 2014 07:52 PM
did i fix it :D?
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 07:52 PM
No.
Report Abuse
drslicendice is not online. drslicendice
Joined: 05 Mar 2011
Total Posts: 18737
18 Jun 2014 07:52 PM
dammmit
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 07:53 PM
Do you know when to use local.
Report Abuse
drslicendice is not online. drslicendice
Joined: 05 Mar 2011
Total Posts: 18737
18 Jun 2014 07:56 PM
How do you even disable S?
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 08:20 PM
Bump
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 08:56 PM
bump
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 09:06 PM
Help, I'm begging you.
Report Abuse
HumanXerxes is not online. HumanXerxes
Joined: 17 Apr 2011
Total Posts: 1351
18 Jun 2014 09:08 PM
Does it work in Solo?
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 09:13 PM
Nope
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
18 Jun 2014 09:20 PM
help..
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