|
| 09 Jun 2013 10:15 PM |
Player,Trigger = script.Parent.Player,script.Parent.Trigger
Trigger.OnClick:connect(function(obj) if (Player.Value and Player.Value.Parent) then return end
local plr = game.Players:GetPlayerFromCharacter(obj.Parent) if (not plr) then return end
if (plr:FindFirstChild("RecentBinoc")) then return end Player.Value = plr
local Control = script.Control:Clone()
wait()
Control.Parent = plr.Backpack Control.Binoculars.Value = script.Parent end) |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 10:18 PM |
| What exactly, do you want? |
|
|
| Report Abuse |
|
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
| |
|
| |
|
| |
|
| |
|
geoglory
|
  |
| Joined: 02 Apr 2013 |
| Total Posts: 1718 |
|
|
| 09 Jun 2013 10:34 PM |
whats that?
~tiny plant head~ |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 10:35 PM |
| The OnClick() doesn't work |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jun 2013 10:47 PM |
you need a clickdetector
so like
trigger.ClickDetector.MouseClick:connect(function(onclick) |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 10:49 PM |
I think if your trigger is a ClickDetector, then you may need to use: trigger.MouseClick:connect(function() instead of OnClick() |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 10:54 PM |
| You're right but it still doesn't work. |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jun 2013 10:59 PM |
| Anybody know how to fix it? I tried several different things but it doesn't work. I put the script.Parent.MouseButton1Click:connect(onClick) at the end and it still doesn't work. |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 11:01 PM |
| Is your trigger a clickdetector or a textbutton? |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jun 2013 11:03 PM |
you put this at the stop
trigger.MouseClick:connect(function(onclick) |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jun 2013 11:06 PM |
It doesn't look like you have called your click function.
If so, then put this at the end of it:
trigger.MouseClick:connect(onClicked) |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jun 2013 11:10 PM |
| Every time I try to post the Output it says "Unexpected Error". Roblox doesn't like output |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jun 2013 11:14 PM |
Player,Trigger = script.Parent.Player,script.Parent.Trigger function OnClick(mouse)
Trigger.MouseClick:connect(function(obj) if (Player.Value and Player.Value.Parent) then return end
local plr = game.Players:GetPlayerFromCharacter(obj.Parent) if (not plr) then return end
if (plr:FindFirstChild("RecentBinoc")) then return end Player.Value = plr
local Control = script.Control:Clone()
wait()
Control.Parent = plr.Backpack Control.Binoculars.Value = script.Parent trigger.MouseClick:connect(onClicked) end)
|
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 11:15 PM |
Player,Trigger = script.Parent.Player,script.Parent.Trigger
Trigger.MouseClick:connect(function(obj) if (Player.Value and Player.Value.Parent) then return end
local plr = game.Players:GetPlayerFromCharacter(obj.Parent) if (not plr) then return end
if (plr:FindFirstChild("RecentBinoc")) then return end Player.Value = plr
local Control = script.Control:Clone()
wait()
Control.Parent = plr.Backpack Control.Binoculars.Value = script.Parent end) |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 11:16 PM |
| put "end)" before your function call. |
|
|
| Report Abuse |
|
|