NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
|
| 03 May 2014 12:27 PM |
Remove "local" before the plr = game.Players.LocalPlayer Also, make sure it is a local script. |
|
|
| Report Abuse |
|
|
Queliux
|
  |
| Joined: 13 Feb 2011 |
| Total Posts: 341 |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
Queliux
|
  |
| Joined: 13 Feb 2011 |
| Total Posts: 341 |
|
|
| 03 May 2014 12:30 PM |
| Does anything happen at all? Also leave it without local before plr anyway. |
|
|
| Report Abuse |
|
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
|
| 03 May 2014 12:34 PM |
I would put the cloning part in the function. Don't know if it makes a difference, but I would do that.
~To see or not to see, that is the question |
|
|
| Report Abuse |
|
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
|
| 03 May 2014 12:36 PM |
Meh. Erm. The only thing I can think of.. maybe the backpack isn't ready, so you have to use the WaitForChild() method? Hm.. That would look something like this.
pcall(function() plr:WaitForChild('Backpack') h.Parent = plr.Backpack game.StarterGui.CheckPoints.Frame.Choose.Visible = false game.StarterGui.CheckPoints.Frame.GoTo.Visible = true end )
script.Parent.ClickDetector.MouseClick:connect(onClick)
Not completely sure if that would fix it, but eh.
|
|
|
| Report Abuse |
|
|
|
| 03 May 2014 12:37 PM |
| Using what I said above, you should put the cloning stuff inside, it could actually fix the error. |
|
|
| Report Abuse |
|
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
Queliux
|
  |
| Joined: 13 Feb 2011 |
| Total Posts: 341 |
|
|
| 03 May 2014 01:01 PM |
--Put this in a LocalScript in the brick that needs to be clicked. --Put a ClickDetector in the brick that needs to be clicked.
wep = "G18" Wep = game.Lighting:FindFirstChild(wep)
function onClick(click) for i,v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do if v.Name == wep then break end end print("Already has the weapon") Wep:Clone().Parent = game.Players.LocalPlayer.Backpack wait(0.1) game.StarterGui.CheckPoints.Frame.Choose.Visible = false game.StarterGui.CheckPoints.Frame.GoTo.Visible = true end
script.Parent.ClickDetector.MouseClick:connect(onClick) |
|
|
| Report Abuse |
|
|
Aethium
|
  |
| Joined: 29 Mar 2014 |
| Total Posts: 574 |
|
|
| 03 May 2014 01:03 PM |
try putting a wait() at the top
- Add 1.5k | Deplexity | its a lego men game stop worrying |
|
|
| Report Abuse |
|
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
Queliux
|
  |
| Joined: 13 Feb 2011 |
| Total Posts: 341 |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
Queliux
|
  |
| Joined: 13 Feb 2011 |
| Total Posts: 341 |
|
|
| 03 May 2014 01:11 PM |
| I've tested something similar before, and that worked and there isn't much f a change in this script, it should work fine. |
|
|
| Report Abuse |
|
|