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: Errors using LocalScripts with Tools?

Previous Thread :: Next Thread 
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
01 May 2014 12:40 PM
for some reason I get errors when I use LocalScripts instead of ServerScripts in a tool, it gives me errors of the position, it works when it's nto a LocalScript but when a serverscript I get no errors, why is that?
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
01 May 2014 12:42 PM
please help
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
01 May 2014 12:43 PM
Other than "not working" I don't understand the problem.
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
01 May 2014 12:45 PM
10:43:20.794 - Position is not a valid member of Tool

This is the script that is erroring, Line 3, but it works without it being a LocalScript..
--
shaft=script.Parent
position=shaft.Position
--

'shaft' is the Part's Handle (I'm making a dual gun)
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
01 May 2014 12:45 PM
10:43:20.794 - Position is not a valid member of Tool
10:43:20.794 - Script 'Players.Player1.Backpack.++.d_shoot', Line 3
10:43:20.795 - Stack End
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
01 May 2014 12:46 PM
Im pretty sure tools do not have a property named Position.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
01 May 2014 12:47 PM
Unless you put the script in the Handle
shaft = script.Parent.Handle >_>
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
01 May 2014 12:50 PM
@wazap
I already tried that, it flings me..

@128GB

theres a script in the handle for when I shoot it activates


This all works using a regular script but when I want to use LocalScripts it doesn;t work wth
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
01 May 2014 12:52 PM
help
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
01 May 2014 12:54 PM
help
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
01 May 2014 12:57 PM
help
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
01 May 2014 01:01 PM
help
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
01 May 2014 01:07 PM
help
Report Abuse
xPRESIDENTx is not online. xPRESIDENTx
Joined: 10 Jun 2011
Total Posts: 815
01 May 2014 01:26 PM
hmm, maybe the weapon has not loaded try

while not script.Parent:findFirstChild("Handle") do wait() end
Report Abuse
xPRESIDENTx is not online. xPRESIDENTx
Joined: 10 Jun 2011
Total Posts: 815
01 May 2014 01:26 PM
By the way all scripts that access the character or player should be local.
Report Abuse
transIate is not online. transIate
Joined: 20 Jun 2013
Total Posts: 2699
01 May 2014 01:33 PM
I need to be able to show you because it works with serverscripts but not with local scripts

this is irritating
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
01 May 2014 01:33 PM
Tools dont have Positions. -_-
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