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
 

Broken Script

Previous Thread :: Next Thread 
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
13 Oct 2013 04:02 PM
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

And it is supposed to clone a script from lighting into the brick the mouse clicked

Please help out....
Report Abuse
adammthomas2000 is not online. adammthomas2000
Joined: 24 Feb 2013
Total Posts: 454
13 Oct 2013 04:03 PM
You need to define the mouse.

Add this at the beginning:

player = game.Players.LocalPlayer
mouse = player:GetMouse()
Report Abuse
adammthomas2000 is not online. adammthomas2000
Joined: 24 Feb 2013
Total Posts: 454
13 Oct 2013 04:16 PM
Oh, and I suggest cloning it from game.ServerStorage instead of lighting. Thats what ServerStorage was made for.
Report Abuse
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
13 Oct 2013 07:44 PM
It throws this at me now

20:43:33.444 - connect cannot be assigned to
20:43:33.446 - Script 'Players.Player1.Backpack.Model Scaler (0.05).Script', Line 3
20:43:33.449 - stack end

D: i really want this tool made '-'
Report Abuse
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
13 Oct 2013 08:53 PM
bump
Report Abuse
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
14 Oct 2013 02:24 PM
bump
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
14 Oct 2013 02:28 PM
mouse.Button1Down:connect(function()
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)
Report Abuse
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
14 Oct 2013 03:26 PM
now it shows this D:

16:24:32.428 - Players.Player1.Backpack.Model Scaler (0.05).Script:1: attempt to index global 'mouse' (a nil value)
16:24:32.437 - Script 'Players.Player1.Backpack.Model Scaler (0.05).Script', Line 1
16:24:32.439 - stack end

help.

(in other words i have been asking, working on this project for like 2 months already and its still not done. I then start to doubt if its even possible D:)
Report Abuse
Rasheedkeon789Alt is not online. Rasheedkeon789Alt
Joined: 05 Apr 2013
Total Posts: 373
14 Oct 2013 03:29 PM
nvm fixed the problem by adding a few lines. THANK YOU EVERYONE FOR YOUR HELP AND SUPPORT

(thread closed)
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