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 » Scripters
Home Search
 

Re: How to detect when a gear is equiped/MouseButton1Click?

Previous Thread :: Next Thread 
iCherryBearypmACC is not online. iCherryBearypmACC
Joined: 14 Feb 2015
Total Posts: 43
21 May 2015 09:30 PM
Anyone have any clue? Here's my current one.

Tool = script.Parent

Tool.Equipped:connect(function(mouse)
print("A tool was equipped")
end)

But nothings happening in Output or anywhere else. The tool is a child of StarterPack and the script is the child of the Tool. What to do??
Report Abuse
iCherryBearypmACC is not online. iCherryBearypmACC
Joined: 14 Feb 2015
Total Posts: 43
21 May 2015 09:31 PM
*
Report Abuse
iCherryBearypmACC is not online. iCherryBearypmACC
Joined: 14 Feb 2015
Total Posts: 43
21 May 2015 09:32 PM
!
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 May 2015 09:32 PM
Is it local or server script?
Report Abuse
iCherryBearypmACC is not online. iCherryBearypmACC
Joined: 14 Feb 2015
Total Posts: 43
21 May 2015 09:34 PM
Its not local.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 May 2015 09:36 PM
Then look in the server output.
Report Abuse
iCherryBearypmACC is not online. iCherryBearypmACC
Joined: 14 Feb 2015
Total Posts: 43
21 May 2015 09:44 PM
I did, nothing's printing...
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 May 2015 09:45 PM
I don't believe you.
Report Abuse
iCherryBearypmACC is not online. iCherryBearypmACC
Joined: 14 Feb 2015
Total Posts: 43
21 May 2015 09:48 PM
Ok then, you don't have to... Theres a reason I posted this board, I'm not an idiot. I needed help with a script that I feel is acting odd, goodbye to you now.

Does anyone else have an answer? This is iCherryBeary's alt, btw.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 May 2015 09:48 PM
It works fine, you're just illiterate.
Report Abuse
iCherryBearypmACC is not online. iCherryBearypmACC
Joined: 14 Feb 2015
Total Posts: 43
21 May 2015 09:54 PM
Eh, you're not worth my time. I need someone that can actually HELP me with my problem, not insult me like a 6-year-old.


Can someone please help me and not insult me? .-.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 May 2015 09:54 PM
Are you sure you actually equipped the tool?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
21 May 2015 09:54 PM
You should never take input without a LocalScript.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 May 2015 09:55 PM
^
What?
Report Abuse
iCherryBearypmACC is not online. iCherryBearypmACC
Joined: 14 Feb 2015
Total Posts: 43
21 May 2015 09:55 PM
Meh, by equipped, do you mean gone in test mode and hit the 1 key? Thats what I keep doing. it does the blue outline and lifts up my arm :/
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 May 2015 09:56 PM
Is the script enabled?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
21 May 2015 09:56 PM
There shouldn't ever be a reason you need to take input in a Script. Not only is it impractical, but every keypress with have latency issues. There's a reason GetMouse and UserInputService only work in LocalScripts.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 May 2015 09:57 PM
Equipped isn't input.
Report Abuse
iCherryBearypmACC is not online. iCherryBearypmACC
Joined: 14 Feb 2015
Total Posts: 43
21 May 2015 09:57 PM
It's enabled.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 May 2015 09:58 PM
Post the entire output here.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
21 May 2015 09:58 PM
It isn't input, but the title of the thread clearly states "MouseButton1Click", which IS input.
Report Abuse
iCherryBearypmACC is not online. iCherryBearypmACC
Joined: 14 Feb 2015
Total Posts: 43
21 May 2015 09:58 PM
20:53:05.414 - Use the new http api: yes
20:53:14.123 - Successfully opened file - C:/Users/Autumn/Documents/ROBLOX/RecentSaves/Cafe Menu_95206881.rbxl
20:54:57.930 - Auto-Saving...
20:54:59.444 - Players is not a valid member of Workspace
20:54:59.445 - Script 'Workspace.Script', Line 1
20:54:59.445 - Stack End
20:55:18.059 - Auto-Saving...
20:55:19.395 - Players is not a valid member of Workspace
20:55:19.397 - Script 'Workspace.Script', Line 1
20:55:19.397 - Stack End
20:55:27.476 - Auto-Saving...
20:55:28.711 - Players is not a valid member of Workspace
20:55:28.712 - Script 'Workspace.Script', Line 1
20:55:28.712 - Stack End
20:58:06.301 - Auto-Saving...
20:58:25.817 - Auto-Saving...
20:58:27.711 - Players is not a valid member of Workspace
20:58:27.719 - Script 'Workspace.Script', Line 1
20:58:27.719 - Stack End
21:03:06.282 - Auto-Saving...
21:08:06.377 - Auto-Saving...
21:13:06.345 - Auto-Saving...
21:18:06.168 - Auto-Saving...
21:20:55.159 - Auto-Saving...
21:21:01.711 - Players is not a valid member of Workspace
21:21:01.712 - Script 'Workspace.Script', Line 1
21:21:01.713 - Stack End
21:21:45.803 - Auto-Saving...
21:21:48.357 - Players is not a valid member of Workspace
21:21:48.358 - Script 'Workspace.Script', Line 1
21:21:48.358 - Stack End
21:23:06.279 - Auto-Saving...
21:28:06.285 - Auto-Saving...
21:29:28.036 - Auto-Saving...
21:29:30.044 - Equipped is not a valid member of Workspace
21:29:30.044 - Script 'Workspace.Script', Line 9
21:29:30.045 - Stack End
21:29:30.943 - Players is not a valid member of Tool
21:29:30.944 - Script 'Players.Player1.Backpack.Handle.Script', Line 1
21:29:30.944 - Stack End
21:33:06.910 - Auto-Saving...
21:38:06.419 - Auto-Saving...
21:43:06.487 - Auto-Saving...
21:48:06.557 - Auto-Saving...
21:53:06.622 - Auto-Saving...
21:58:06.698 - Auto-Saving...
Report Abuse
iCherryBearypmACC is not online. iCherryBearypmACC
Joined: 14 Feb 2015
Total Posts: 43
21 May 2015 10:00 PM
But all those errors are for a different script, another test one I have that I moved under Workspace. Could that interfere?
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 May 2015 10:01 PM
@JarodOfOrbiter
Yeah, well, Activated is the same as MouseButton1Click and works server-side for a reason. It is much better, in many cases, to handle the firing of weapons on the server. In fact, most weapons on Roblox do this.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
21 May 2015 10:01 PM
You're telling me you didn't see this?

21:29:30.044 - Equipped is not a valid member of Workspace
21:29:30.044 - Script 'Workspace.Script', Line 9
21:29:30.045 - Stack End
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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