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: Stop a tool being automatically activated?

Previous Thread :: Next Thread 
EmsyThorne is not online. EmsyThorne
Joined: 07 May 2015
Total Posts: 183
16 Aug 2015 12:40 PM
Hey everyone,

Is there a way to stop a tool automatically being selected when touched, either in its properties (though I doubt this, I've tried) or with code?

Thanks,
Ems
Report Abuse
Intern33t is not online. Intern33t
Joined: 19 Nov 2010
Total Posts: 1530
16 Aug 2015 12:41 PM
script in tool:

script.Parent.Selected:connect(function()script.Parent:Deselect()end)

pls do u even try
Report Abuse
EmsyThorne is not online. EmsyThorne
Joined: 07 May 2015
Total Posts: 183
16 Aug 2015 12:47 PM
Not working, no error in the output window either.
Report Abuse
Intern33t is not online. Intern33t
Joined: 19 Nov 2010
Total Posts: 1530
16 Aug 2015 12:51 PM
lol k do i even try

script.Parent.AncestryChanged:connect(function(c, p)
if c == script.Parent then
c.Parent = game.Players[p.Name]
end
end)
Report Abuse
Sasayaki is not online. Sasayaki
Joined: 29 Jun 2007
Total Posts: 33868
16 Aug 2015 12:52 PM
"Is there a way to stop a tool automatically being selected when touched"

explain.
Report Abuse
Intern33t is not online. Intern33t
Joined: 19 Nov 2010
Total Posts: 1530
16 Aug 2015 12:52 PM
ok im not trying lol
i hop dis work

script.Parent.AncestryChanged:connect(function(c, p)
if c == script.Parent then
c.Parent = game.Players[p.Name].Backpack
end
end)
Report Abuse
EmsyThorne is not online. EmsyThorne
Joined: 07 May 2015
Total Posts: 183
16 Aug 2015 12:54 PM
@Sasayaki

Say a tool is in the workplace. If a player goes over to touch it, it will be moved to the backpack of said player and will be equipped.

The problem I have is I would like it to not be equipped when it's moved.
Report Abuse
Sasayaki is not online. Sasayaki
Joined: 29 Jun 2007
Total Posts: 33868
16 Aug 2015 01:21 PM
make a giver instead that gets destroyed() which places it into the backpack
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