datdude3
|
  |
| Joined: 23 Apr 2010 |
| Total Posts: 577 |
|
|
| 26 Feb 2014 04:14 PM |
repeat wait() until game.Players.LocalPlayer.Character
SS = game.ServerStorage script.Parent.MouseButton1Down:connect(function() SS.RS:Clone().Parent = game.Players.LocalPlayer.Backpack wait(3) script.Parent.Parent:remove() end)
--Gives players a regular sword if they click it
repeat wait() until game.Players.LocalPlayer.Character SS = game.ServerStorage
script.Parent.MouseButton1Down:connect(function() money = game.Players.LocalPlayer.leaderstats.Money
if game.Players.LocalPlayer.leaderstats.Money.Value >= 4 then SS.Iced:Clone().Parent = game.Players.LocalPlayer.Backpack wait(2) script.Parent.Parent:Destroy() end end)
--If you have 4 points it gives you an ice dagger.
pls help i dont kno wat tu du |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2014 04:38 PM |
Most likely problem is that you're not running the code in a LocalScript.
You see, when you Play Solo, everything is run locally, so you can use LocalPlayer and CurrentCamera in a normal script. However, when you play from the website it creates a Server/Client connection, and you can't use local objects like that anymore. |
|
|
| Report Abuse |
|
|
datdude3
|
  |
| Joined: 23 Apr 2010 |
| Total Posts: 577 |
|
|
| 26 Feb 2014 04:39 PM |
| I used local script before it still didn't work. |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2014 04:40 PM |
| Also, you cannot access ServerStorage from a LocalScript. Move everything to ReplicatedStorage. |
|
|
| Report Abuse |
|
|
datdude3
|
  |
| Joined: 23 Apr 2010 |
| Total Posts: 577 |
|
| |
|
datdude3
|
  |
| Joined: 23 Apr 2010 |
| Total Posts: 577 |
|
|
| 26 Feb 2014 04:45 PM |
| My god it worked. YOU ARE A GENIUS SIR I TRULY THANK YOU |
|
|
| Report Abuse |
|
|
| |
|
datdude3
|
  |
| Joined: 23 Apr 2010 |
| Total Posts: 577 |
|
|
| 26 Feb 2014 04:47 PM |
| Uh oh, it breaks. If you die it breaks |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2014 05:12 PM |
when you die you could clone the script and delete the previous one hacky solution but doable |
|
|
| Report Abuse |
|
|