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: tool help

Previous Thread :: Next Thread 
LegoDude9630 is not online. LegoDude9630
Joined: 05 May 2011
Total Posts: 7177
14 Apr 2015 11:05 AM
Right now I have a script that clones a tool and puts it in your player, but i have a problem, the tool automatically equips itself, is there a way i can have the tool be added to someone's inventory unequipped?

welcome to RT mr squidward, i hope you like wearing leather
Report Abuse
lokkut is not online. lokkut
Joined: 18 Mar 2009
Total Posts: 1794
14 Apr 2015 11:06 AM
Yes
Put it in Player.Backpack
not Player.Character
Report Abuse
LegoDude9630 is not online. LegoDude9630
Joined: 05 May 2011
Total Posts: 7177
14 Apr 2015 11:14 AM
I tried this but it didn't work as I planned

debounce = false

player = game.Players.LocalPlayer
char = player.Backpack
function onTouch(hit)
if debounce == false then
debounce = true
local gun = game.Workspace.RedPaintballGun:Clone()
gun.Parent = char
debounce = false
wait(.1)
end
end
script.Parent.Touched:connect(onTouch)
Report Abuse
lokkut is not online. lokkut
Joined: 18 Mar 2009
Total Posts: 1794
14 Apr 2015 11:15 AM
debounce = false
wait(.1)

should be

wait()
debounce = false
Report Abuse
LegoDude9630 is not online. LegoDude9630
Joined: 05 May 2011
Total Posts: 7177
14 Apr 2015 11:16 AM
didn't really fix the problem

welcome to RT mr squidward, i hope you like wearing leather
Report Abuse
lokkut is not online. lokkut
Joined: 18 Mar 2009
Total Posts: 1794
14 Apr 2015 11:17 AM
didn't really state the problem.
Report Abuse
LegoDude9630 is not online. LegoDude9630
Joined: 05 May 2011
Total Posts: 7177
14 Apr 2015 11:20 AM
the tool isn't spawning

welcome to RT mr squidward, i hope you like wearing leather
Report Abuse
lokkut is not online. lokkut
Joined: 18 Mar 2009
Total Posts: 1794
14 Apr 2015 11:22 AM
player = game.Players.LocalPlayer

can't be used in a normal script.

use player = game.Players:GetPlayerFromCharacter(hit.Parent)
Report Abuse
LegoDude9630 is not online. LegoDude9630
Joined: 05 May 2011
Total Posts: 7177
14 Apr 2015 11:31 AM
Thanks man :)

welcome to RT mr squidward, i hope you like wearing leather
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