|
| 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
|
  |
| Joined: 18 Mar 2009 |
| Total Posts: 1794 |
|
|
| 14 Apr 2015 11:06 AM |
Yes Put it in Player.Backpack not Player.Character |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 18 Mar 2009 |
| Total Posts: 1794 |
|
|
| 14 Apr 2015 11:15 AM |
debounce = false wait(.1)
should be
wait() debounce = false
|
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 18 Mar 2009 |
| Total Posts: 1794 |
|
|
| 14 Apr 2015 11:17 AM |
| didn't really state the problem. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 14 Apr 2015 11:31 AM |
Thanks man :)
welcome to RT mr squidward, i hope you like wearing leather |
|
|
| Report Abuse |
|
|