|
| 02 Oct 2013 06:19 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 |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 02 Oct 2013 06:21 PM |
function onSelected(mouse) mouse.Button1Down:connect(onButton1Down) if mouse.Target then -- Meh... this might do nothing. if mouse.Target.Parent.ClassName == "Model" then --[[It has to be different conditional statements to actually function properly without a nil variable.]] if not mouse.Target.Locked then Smallmap:clone() SmallMap.Parent = Target.Parent end end end end
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2013 06:51 PM |
Ok so it stopped throwing errors at me but it doesn't work still D:
It does nothing now.
Any other ideas?
function onSelected(mouse) mouse.Button1Down:connect(onButton1Down) if mouse.Target then -- Meh... this might do nothing. if mouse.Target.Parent.ClassName == "Model" then --[[It has to be different conditional statements to actually function properly without a nil variable.]] if not mouse.Target.Locked then copy=game.Lighting.SmallMap:Clone() copy.Parent = mouse.Target end end end end |
|
|
| Report Abuse |
|
|
| |
|
| |
|
fabiao
|
  |
| Joined: 05 Jun 2008 |
| Total Posts: 2243 |
|
|
| 03 Oct 2013 05:02 PM |
function onSelected(mouse) mouse.Button1Down:connect(function() if mouse.Target then -- Meh... this might do nothing. if mouse.Target.Parent.ClassName == "Model" then --[[It has to be different conditional statements to actually function properly without a nil variable.]] copy=game.Lighting.SmallMap:Clone() copy.Parent = mouse.Target end end) end
You tried to hook an event to a function that didn't exist. So, I changed it to an anonymous function. |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2013 06:31 PM |
This doesn't work either.
Please help \ (<>_<>) / |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 05 Oct 2013 11:53 AM |
UGH. what does it take for anyone good enough to help me!
I need help, that all, HELP
Thats all im asking for T_T_T_T_T_T |
|
|
| Report Abuse |
|
|
|
| 05 Oct 2013 12:03 PM |
function onSelected(mouse) mouse.Button1Down:connect(function() if mouse.Target then -- Meh... this might do nothing. if mouse.Target.Parent.ClassName == "Model" then --[[It has to be different conditional statements to actually function properly without a nil variable.]] if not mouse.Target.Locked then Smallmap:clone() SmallMap.Parent = Target.Parent end end end end) end
-Believe and you will achieve- |
|
|
| Report Abuse |
|
|
muscus32
|
  |
| Joined: 18 Oct 2012 |
| Total Posts: 2648 |
|
|
| 05 Oct 2013 12:04 PM |
| Hey, I would love to help! But, when people whine for stuff I realize they are 3 and that I won't help 3 year olds. |
|
|
| Report Abuse |
|
|
|
| 05 Oct 2013 08:01 PM |
Script still doesn't work
@muscus im not whining im asking but no one's helping |
|
|
| Report Abuse |
|
|
muscus32
|
  |
| Joined: 18 Oct 2012 |
| Total Posts: 2648 |
|
|
| 05 Oct 2013 08:06 PM |
| People have been trying to help and you keep on saying "PLEASE HELP!" "PLEASE HELP D:" |
|
|
| Report Abuse |
|
|
domorox17
|
  |
| Joined: 06 Mar 2012 |
| Total Posts: 1710 |
|
|
| 05 Oct 2013 08:11 PM |
| muscus is right. if u want help, give people the time to do it. go to other threads, help others, then check in a few minutes |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2013 11:30 AM |
The script...
function mouse.Button1Down:connect(onButton1Down) if mouse ~= nil then if mouse.Target.Parent ~= Workspace and mouse.Target.Locked == false and mouse.Target ~= nil then wow = game.Lighting.SmallMap:clone() wow.Parent = mouse.Target end end end
The error it throws....
12:29:39.956 - Players.Player1.Backpack.Model Scaler (0.05).Script:1: attempt to index global 'mouse' (a nil value) 12:29:39.967 - Script 'Players.Player1.Backpack.Model Scaler (0.05).Script', Line 1 12:29:39.969 - stack end
Please help out.... |
|
|
| Report Abuse |
|
|