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: It will work without the tool but not with the tool

Previous Thread :: Next Thread 
markus6 is not online. markus6
Joined: 27 Mar 2011
Total Posts: 281
23 Jun 2014 03:16 PM
--Nickanames
-----------------------------------------------------------|
local sp=script.Parent --|
local player=script.Parent.Parent.Parent.Parent.Character--|
local mouse=script.Parent.Parent.Parent.Parent:GetMouse()--|
-----------------------------------------------------------|


function MouseLeftPressed(Button1Down)
sp.Parent.Parent:WaitForChild("ToHeavePlease")
----------------Breaking physics
local BF = Instance.new("BodyForce")
BF.Parent=player.Torso
BF.force=Vector3.new(0,6000,0)
------------------------------
end


function MouseLeftStop(Button1Down)
--------------Balancing the physics
player.Torso.BodyForce:Destroy()
------------------------------------
end


-----------------DONT TOUCH!
mouse.Button1Up:connect(MouseLeftStop)
mouse.Button1Down:connect(MouseLeftPressed)
------------------------------





the problem is that it will work when i havent equipped the tool, but it will not work when i have equipped the tool
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
23 Jun 2014 03:24 PM
How much robux will you pay me.

Get it? i'm using your words against you.

Never trust atoms, they make up everything.
Report Abuse
markus6 is not online. markus6
Joined: 27 Mar 2011
Total Posts: 281
23 Jun 2014 03:30 PM
@above You was asking for if i could MAKE something, now I am asking for someone to help me FIND the PROBLEM in the script that I made and NO ONE made FOR me.


Report Abuse
MrTucan1996 is not online. MrTucan1996
Joined: 19 Aug 2009
Total Posts: 5994
23 Jun 2014 03:37 PM
Probably because you have to recognize the script and the tool
Report Abuse
DataStore is not online. DataStore
Joined: 07 Feb 2012
Total Posts: 8540
23 Jun 2014 03:39 PM
It's because you're using GetMouse. Use the tool object's equipped event, using the mouse given to you by that event (rather than the one given by GetMouse).

http://wiki.roblox.com/index.php?title=API:Class/Tool/Equipped
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
23 Jun 2014 03:53 PM
I wasn't asking you to make me something, I was asking for someone to help me with something. Think before you speak.

Never trust atoms, they make up everything.
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