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: simple script help!

Previous Thread :: Next Thread 
Mezur is online. 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 is online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
18 Mar 2017 08:16 PM
b1
Report Abuse
Mezur is online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
18 Mar 2017 08:17 PM
b2
Report Abuse
hasang1 is not online. 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 is online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
18 Mar 2017 08:20 PM
Need help. Will pay robux.
Report Abuse
hasang1 is not online. 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 is online. 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
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