|
| 31 Aug 2013 12:29 AM |
local ToolName = "TOOLNAMEHERE" local Character = script.Parent.Parent.Character local Player = game.Player.LocalPlayer if Character.ToolName then Player.Backpack.Parent = Player.PlayerGui end
local Tool = Character.ToolName local Removed = Tool:Removed() if Character.ToolName == Removed then Player.PlayerGui.Backpack.Parent = Player end |
|
|
| Report Abuse |
|
|
janthran2
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 84 |
|
|
| 31 Aug 2013 12:32 AM |
You can't do Item.Variable So no, it won't work. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:34 AM |
| Do you know how to make it work? .-. |
|
|
| Report Abuse |
|
|
janthran2
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 84 |
|
|
| 31 Aug 2013 12:38 AM |
Character:FindFirstChild(ToolName) I think |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:40 AM |
| What line would that be in the script? |
|
|
| Report Abuse |
|
|
janthran2
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 84 |
|
|
| 31 Aug 2013 12:42 AM |
local ToolName = "TOOLNAMEHERE" local Character = script.Parent.Parent.Character local Player = game.Player.LocalPlayer if Character.ToolName then Player.Backpack.Parent = Player.PlayerGui
Change to
local ToolName = "TOOLNAMEHERE" local Character = script.Parent.Parent.Character local Player = game.Player.LocalPlayer if Character:FindFirstChild(ToolName) then--Right over here Player.Backpack.Parent = Player.PlayerGui |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:46 AM |
Will this work too?:
local Tool = Character.ToolName local Removed = Tool:Removed() if Character.ToolName == Removed then Player.PlayerGui.Backpack.Parent = Player end
To see the tools again? |
|
|
| Report Abuse |
|
|
janthran2
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 84 |
|
|
| 31 Aug 2013 12:47 AM |
Replace Character.ToolName with Character:FindFirstChild(ToolName) |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:49 AM |
So:
local Removed = Tool:Removed() if Character.ToolName == Removed then
Will work? |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:50 AM |
| What are you trying to do exactly? |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:55 AM |
When you use a tool, your player's Backpack's parent changes, so you have no tool. When you put the tool down, you get your tools back.
This is the script:
print("Remove/Get tools script loaded... Creator: pikaard and a few other people's help.") local Config = script.Configuration local ToolName = Config.ToolName.Value local Character = script.Parent.Parent.Character local Player = game.Player.LocalPlayer
if Character:FindFirstChild(ToolName) then Player.Backpack.Parent = Player.PlayerGui end
local Tool = Character:FindFirstChild(ToolName) local Removed = Tool:Removed() if Character.ToolName == Removed then Player.PlayerGui.Backpack.Parent = Player end |
|
|
| Report Abuse |
|
|
| |
|