|
| 04 Oct 2010 01:38 PM |
local dist = 10
function onButton1Down(mouse) local targ = mouse.Target if targ~=nil then if (targ.Position - mouse).magnitude < dist then restofscriptbelow
________________________________________________________________________ Players.Player.Backpack.MineTool.Script:19: bad argument #2 to '?' (Vector3 expected, got userdata)
Players.Player.Backpack.MineTool.Script, line 19 - global onButton1Down Players.Player.Backpack.MineTool.Script, line 127 stack end
Disconnected event because of exception |
|
|
| Report Abuse |
|
|
|
| 04 Oct 2010 01:39 PM |
| Trying to make the max disance away from a part that you can use the tool at. |
|
|
| Report Abuse |
|
|
| |
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 04 Oct 2010 02:56 PM |
local dist = 10
function onButton1Down(mouse) local targ = mouse.Target if targ~=nil then if (targ.Position - mouse.Position).magnitude < dist then
-- Im not pretty sure about it, i never use Guis o_e |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 Oct 2010 03:15 PM |
| (not a gui, its hopperbin) |
|
|
| Report Abuse |
|
|
|
| 04 Oct 2010 03:18 PM |
| Theres no position in mouse |
|
|
| Report Abuse |
|
|
|
| 04 Oct 2010 03:20 PM |
function onButton1Down(mouse) local targ = mouse.Target if targ~=nil then if (targ.Position - script.Parent.Parent.Parent.Character.Torso.Position).magnitude < dist then |
|
|
| Report Abuse |
|
|
|
| 04 Oct 2010 03:22 PM |
| Omg thanks crazypotato! :D |
|
|
| Report Abuse |
|
|
zeke505
|
  |
| Joined: 26 May 2008 |
| Total Posts: 15765 |
|
|
| 04 Oct 2010 03:23 PM |
mouse.CFrame.p
Thats how you get the vector3 of the mouse. It's not what you want, though. :P |
|
|
| Report Abuse |
|
|
zeke505
|
  |
| Joined: 26 May 2008 |
| Total Posts: 15765 |
|
|
| 04 Oct 2010 03:24 PM |
Errr...
mouse.Origin.p
Universe["Milky Way Galaxy"]["Earth Satellite"].Roblox[Com].Forums.Floodcheck:Remove() |
|
|
| Report Abuse |
|
|
|
| 04 Oct 2010 03:36 PM |
| Still wrong. mouse.Hit.p returns a vector,since mouse.Hit is a CFrame |
|
|
| Report Abuse |
|
|
zeke505
|
  |
| Joined: 26 May 2008 |
| Total Posts: 15765 |
|
|
| 04 Oct 2010 03:37 PM |
@Render
mouse.Origin is the CFrame, too. durp. |
|
|
| Report Abuse |
|
|