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: DataPersistence

Previous Thread :: Next Thread 
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
27 Jan 2013 02:37 PM
I have this code, and I can not check if it is right on ANY way.
The whole script works in solo, because the name of a player is Player1. But in Server, it doesn't work. (It needs a local script, because I mess with the camera)
------------------------------------------------------------------
if player.Name ~= "Player1" then
player:WaitForDataReady()
if player:LoadInstance("Chars") ~= nil then
local chars = player:LoadInstance("Chars")

local a = chars:GetChildren()
for i=1,#a do
a[i]:clone().Parent = player.Chars
end
end
end
--------------------------------------------------------------------
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
27 Jan 2013 02:40 PM
You could use
local player = Game.Players.LocalPlayer
in a local script
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
27 Jan 2013 02:40 PM
I did?
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
27 Jan 2013 02:41 PM
Localscripts don't work with DP.
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
27 Jan 2013 02:41 PM
This is the part of the code when you click a button that is wrong.
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
27 Jan 2013 02:44 PM
Thanks. I'll see if it works.
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
27 Jan 2013 02:51 PM
I can't test due the HPResult bug.
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
27 Jan 2013 02:52 PM
The first line needs a ~== I think, not a ~=. I think that is what's happening with the Player1. I'm not a really good scripter, so what I suggest may not be right.
Report Abuse
gerit99 is not online. gerit99
Joined: 21 Jul 2010
Total Posts: 521
27 Jan 2013 03:01 PM
No? And btw, if I include that it works on Player1, because then it doesn't load.
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