Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 18 Mar 2017 08:14 PM |
I want it so, if you have the amount of "Swag XP" which is "10", then it allows you to click on the part and obtain the tool. Why isn't it working?
local kills = leaderstats:WaitForChild("Swag XP") local required = 10
Toolname = "Swag Gun" --Name of your tool, make sure tool is in lighting
function boop(Player) (kills.Value >= required and if not Player.Backpack:FindFirstChild(Toolname) then local Tool = game.Lighting[Toolname]:clone() Tool.Parent = Player.Backpack end end script.Parent.ClickDetector.MouseClick:connect(boop) |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
| |
|
hasang1
|
  |
| Joined: 09 Nov 2012 |
| Total Posts: 903 |
|
|
| 18 Mar 2017 08:19 PM |
Can you like, stop bumping each minute? Also, you seem to have NO idea on basic if statements, so go check out http://wiki.roblox.com/index.php?title=Intro_to_Scripting
HAX. |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 18 Mar 2017 08:20 PM |
| Need help. Will pay robux. |
|
|
| Report Abuse |
|
|
hasang1
|
  |
| Joined: 09 Nov 2012 |
| Total Posts: 903 |
|
|
| 18 Mar 2017 08:32 PM |
function boop(Player) if kills.Value >= required and not Player.Backpack:FindFirstChild( Toolname ) then local Tool = game.Lighting[Toolname]:clone() Tool.Parent = Player.Backpack end end
script.Parent.ClickDetector.MouseClick:connect( boop )
HAX. |
|
|
| Report Abuse |
|
|
Mezur
|
  |
| Joined: 29 Jun 2015 |
| Total Posts: 3040 |
|
|
| 18 Mar 2017 08:51 PM |
It doesn't work:
local kills = leaderstats:WaitForChild("Swag XP") local required = 10
Toolname = "Swag Gun" --Name of your tool, make sure tool is in lighting
function boop(Player) if kills.Value >= required and not Player.Backpack:FindFirstChild( Toolname ) then local Tool = game.Lighting[Toolname]:clone() Tool.Parent = Player.Backpack end end
|
|
|
| Report Abuse |
|
|