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
 

Re: localscript works in studio only

Previous Thread :: Next Thread 
hungryerock02 is not online. hungryerock02
Joined: 31 Aug 2012
Total Posts: 75
01 Feb 2015 09:50 AM
local db = false
local plr = game.Players.LocalPlayer
local bought = false
local textKey = script.Parent.Text

script.Parent.MouseButton1Down:connect(function(mouse)
if db == false and plr.rupees.Value >= 35 and bought == false then db = true
script.Parent.Text = "Shield bought!"
game.ServerStorage["Deku Shield"]:Clone().Parent = plr.Backpack
plr.rupees.Value = plr.rupees.Value - 35
bought = true
db = false
else
if db == false and bought == false then db = true
script.Parent.Text = "Not enough rupees!"
script.Parent["Error Ding"]:Play()
wait(2)
script.Parent.Text = textKey
db = false
end
end
end)
Report Abuse
hungryerock02 is not online. hungryerock02
Joined: 31 Aug 2012
Total Posts: 75
01 Feb 2015 09:51 AM
can someone help?
Report Abuse
hungryerock02 is not online. hungryerock02
Joined: 31 Aug 2012
Total Posts: 75
01 Feb 2015 09:58 AM
v
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
01 Feb 2015 10:00 AM
> game.ServerStorage["Deku Shield"]:Clone().Parent = plr.Backpack

You're trying to access a server-exclusive object in a client-side script. In studio the client and the server are the same, so it works.
Report Abuse
hungryerock02 is not online. hungryerock02
Joined: 31 Aug 2012
Total Posts: 75
01 Feb 2015 10:01 AM
"So, it works"

but it doesn't...



Report Abuse
Rit957 is not online. Rit957
Joined: 19 Apr 2011
Total Posts: 3459
01 Feb 2015 10:02 AM
You are making a LOZ game?
Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
01 Feb 2015 10:03 AM
well, yeah

this is the main account of hungryerock02

hungryerock02 is my friends and i use his robux for making audios
Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
01 Feb 2015 10:04 AM
http://www.roblox.com/The-Legend-of-ROBLOXian-Pre-Alpha-TR8-place?id=195082829
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
01 Feb 2015 10:07 AM
I think you missed the point.
He said it works in STUDIO because there, the client and the server are the same. You need to put whatever you're cloning into ReplicatedStorage instead of ServiceStorage
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