|
| 09 Oct 2013 05:27 PM |
so this is the script
function onSelected(mouse) mouse.Button1Down:connect(onButton1Down) if mouse.Target ~= nil then if mouse.Target.Parent.className == "Model" and mouse.Target.Locked == false then Smallmap:clone() SmallMap.Parent = Target.Parent end end end
script.Parent.Selected:connect(onSelected)
and this is the error it gives me
19:18:28.353 - attempt to call a nil value 19:18:28.356 - Disconnected event because of exception
and the script is suppose to clone a scaling script from the lighting into the model the mouse has clicked.
Help is very much needed |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 09 Oct 2013 05:31 PM |
Err, Not sure if you defined it either. You didn`t parent the clone. |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2013 05:53 PM |
I think the parent part was at "SmallMap.Parent = target.Parent
The caps thing i fixed that but still doesnt work |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2013 06:16 PM |
"mouse.Button1Down:connect(onButton1Down)" Make it anonymous. |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2013 06:19 PM |
Ermm, anonymous?
I dont know how to change it to that >_<
<---------------------- noobie scripter |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2013 06:23 PM |
That`s a connection line to a nonexistent function, Look at the last line and see how it works. Likewise look at this: http://wiki.roblox.com/index.php/Scripting_Book/Chapter_15#What_is_an_anonymous_function.3F |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2013 06:56 PM |
Ermm, i don't think the mousedown function can be anonymous at all, i did it right and it threw same errors D:
i even tried that to the select thing |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 11 Oct 2013 03:06 PM |
if your using at solo the problem is that you move and it stop working. theres a critical error. let me try to adjust a phew things, v2 one big thing, caps will not affect the script, only the model name affects the script. And im sorry to say you used a incorrect int value: Smallmap:clone() -- Wrong model cloning Smallmap.Parent = Target.Parent -- Wrong int value Im sorry for that epic glitch xD rest is good. V2:
function onSelected(mouse) mouse.Button1Down:connect(onButton1Down) if mouse.Target ~= nil then if mouse.Target.Parent.className == "Model" and mouse.Target.Locked == false then Smallmap:clone().Parent = Target.Parent end end end
script.Parent.Selected:connect(onSelected) script.Parent.MouseButton1Down:connect(onMouseButton1Down)
-- STAY THIS LINE BLANK --------------------------------------------------------------------------------------------------------------- you also must copy and paste -- STAY THIS LINE BLANK. and rlly left a line blank or script will not connect, i mean, two blank lines.
--[ Scripting Helper ]-- |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 08:33 PM |
21:32:16.314 - MouseButton1Down is not a valid member of HopperBin
wat... |
|
|
| Report Abuse |
|
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
|
| 11 Oct 2013 08:36 PM |
| didya accidentaly insert a hopperbin instead of a tool? |
|
|
| Report Abuse |
|
|
|
| 11 Oct 2013 08:37 PM |
mouse.Button1Down:connect(function(MouseButton) end) |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 11:56 AM |
12:54:27.547 - Players.Player1.Backpack.Model Scaler (0.05).Script:12: attempt to index global 'mouse' (a nil value) 12:54:27.602 - Script 'Players.Player1.Backpack.Model Scaler (0.05).Script', Line 12 12:54:27.606 - stack end
didnt work either.
Plz help |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 05:18 PM |
function onSelected(mouse) mouse.Button1Down:connect(onButton1Down) if mouse.Target ~= nil and mouse.Target.Locked == false and mouse.Target.Parent ~= "Workspace" then wow = game.Lighting.SmallMap:clone() wow.Parent = mouse.Target end end
script.Parent.Selected:connect(onSelected) mouse.Button1Down:connect(function(MouseButton) end)
Script revision 3. It is supposed to make the script IN THE BRICK itself and not the model.
However it throws the same errors above.
btw the tool is a hopperbin. Sorry if this caused any confusion |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
| |
|
|
| 12 Oct 2013 05:24 PM |
| Anonymous functions, You`re doing it wrong. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 05:24 PM |
| ok and how will i fix that, thank you. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2013 05:26 PM |
| Take a look at the link i`ve provided you, You clearly did not grok it. |
|
|
| Report Abuse |
|
|