generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Why wouldn't this work?

Previous Thread :: Next Thread 
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
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
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
09 Oct 2013 05:28 PM
Smallmap or SmallMap
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
09 Oct 2013 05:29 PM
/\Caps matter
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
09 Oct 2013 05:31 PM
Err, Not sure if you defined it either.
You didn`t parent the clone.
Report Abuse
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
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
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
09 Oct 2013 06:16 PM
"mouse.Button1Down:connect(onButton1Down)"
Make it anonymous.
Report Abuse
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
09 Oct 2013 06:19 PM
Ermm, anonymous?

I dont know how to change it to that >_<

<---------------------- noobie scripter
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
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
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
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
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
10 Oct 2013 05:37 PM
bump
Report Abuse
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
11 Oct 2013 02:47 PM
bump
Report Abuse
marcoantoniosantos3 is not online. marcoantoniosantos3
Joined: 10 Feb 2013
Total Posts: 408
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
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
11 Oct 2013 08:33 PM
21:32:16.314 - MouseButton1Down is not a valid member of HopperBin

wat...
Report Abuse
domorox17 is not online. 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
Project2015 is not online. Project2015
Joined: 11 Sep 2013
Total Posts: 384
11 Oct 2013 08:37 PM
mouse.Button1Down:connect(function(MouseButton)
end)
Report Abuse
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
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
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
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 is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Oct 2013 05:18 PM
`onButton1Down` is nil
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
12 Oct 2013 05:24 PM
Anonymous functions, You`re doing it wrong.
Report Abuse
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
12 Oct 2013 05:24 PM
ok and how will i fix that, thank you.
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
12 Oct 2013 05:26 PM
Take a look at the link i`ve provided you, You clearly did not grok it.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image