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: locl in a script

Previous Thread :: Next Thread 
SwordFire10 is not online. SwordFire10
Joined: 16 Jul 2010
Total Posts: 4444
12 Jun 2013 02:40 PM
If it's spelled locl, is it supposed to be local?

Here's the script

SwordCost = 35
locl = script.Parent.Parent.Parent.Parent.leaderstats -- Assuming this will be on a >Frame<

script.Parent.ShopGUI.MouseButton1Click:connect(function()
if locl.KOs.Value == SwordCost then
game.Lighting.Cerulean_Vengeance:clone().Parent = locl.Backpack
end
end)

Also, if the gear in the lighting is Cerulean Vengeance, not Cerulean_Vengeance, will the script still work?
Report Abuse
SwordFire10 is not online. SwordFire10
Joined: 16 Jul 2010
Total Posts: 4444
12 Jun 2013 02:42 PM
B1, please help
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
12 Jun 2013 02:43 PM
No, you put local infront of a variable, for example:

local locl = script.Parent.Parent.Parent.Parent.leaderstats
Report Abuse
SwordFire10 is not online. SwordFire10
Joined: 16 Jul 2010
Total Posts: 4444
12 Jun 2013 02:45 PM
Can you fix the script for me? I don't understand, I'm new to scripting.

Then post the full script here?
Report Abuse
SwordFire10 is not online. SwordFire10
Joined: 16 Jul 2010
Total Posts: 4444
12 Jun 2013 02:46 PM
Also, what does LOCL mean/
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
12 Jun 2013 02:47 PM
'locl' is a variable that was defined.

local SwordCost = 35
local locl = script.Parent.Parent.Parent.Parent.leaderstats -- Assuming this will be on a >Frame<

script.Parent.ShopGUI.MouseButton1Click:connect(function()
if locl.KOs.Value == SwordCost then
game.Lighting["Cerulean_Vengeance"]:clone().Parent = locl.Parent.Backpack
end
end)
Report Abuse
SwordFire10 is not online. SwordFire10
Joined: 16 Jul 2010
Total Posts: 4444
12 Jun 2013 02:48 PM
Thanks.
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