zaniac10
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 10000 |
|
|
| 11 Dec 2014 02:08 PM |
wait(5) local plr = game.Players.LocalPlayer local b = script.Parent
b.MouseButton1Down:connect(function() if plr:FindFirstChild("leaderstats") then if plr.leaderstats.Money.Value >= 200 then print("Successfully bought item! ~zaniac10") game.ServerStorage.FastSnowball:Clone().Parent = plr.Backpack else print("Not enough cash for item! ~zaniac10") end end end)
well?
no output except for "Successfuly bought item! ~zaniac10", and it doesn't give me the item (in online mode), and "Not enough cash for item! ~zaniac10"
~ zαηίας10 | https://www.youtube.com/watch?v=5u3iv8AT8G8 |
|
|
| Report Abuse |
|
|
| |
|
zaniac10
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 10000 |
|
|
| 11 Dec 2014 02:23 PM |
yes
~ zαηίας10 | https://www.youtube.com/watch?v=5u3iv8AT8G8 |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2014 02:26 PM |
| Put the snowball in ReplicatedStorage instead of ServerStorage. Local scripts can't access ServerStorage. |
|
|
| Report Abuse |
|
|
zaniac10
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 10000 |
|
|
| 11 Dec 2014 02:28 PM |
did not know that i'll try it
~ zαηίας10 | https://www.youtube.com/watch?v=5u3iv8AT8G8 |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2014 02:29 PM |
robloxking is right.
http://wiki.roblox.com/index.php?title=ServerStorage
"The advantage to storing objects server-side only is that network traffic will not be spent on transmitting these objects to players, which could be useful if, for instance, a place has several maps with a lot of parts that would otherwise all have to be downloaded by the client when the player joins a place, but only one is used at a time. The disadvantage is that LocalScripts will not be able to access the contents of this service." |
|
|
| Report Abuse |
|
|
zaniac10
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 10000 |
|
|
| 11 Dec 2014 02:40 PM |
thanks soooo much!
wait(5) local b = script.Parent local plr = game.Players.LocalPlayer
b.MouseButton1Down:connect(function() if plr:FindFirstChild("leaderstats") then if plr.leaderstats.Money.Value >= 200 then print("Successfully bought item! ~zaniac10") game.ReplicatedStorage.FastSnowball:Clone().Parent = plr.Backpack else print("Not enough cash for item! ~zaniac10") end end end)
it worked woot!
~ zαηίας10 | https://www.youtube.com/watch?v=5u3iv8AT8G8 |
|
|
| Report Abuse |
|
|