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: Can anyone help with this script?

Previous Thread :: Next Thread 
snakeeyes3O8 is not online. snakeeyes3O8
Joined: 30 Mar 2016
Total Posts: 252
06 May 2017 12:35 AM
so the script works but i want a wait() in it as when i put a wait it takes the time i put to spawn it what i want it to do is have a reload time so you cant spam. but i dont want it to affect the time it take to spawn just a reload between use.




--------------------------------------------------------------------------
bin = script.Parent

function onButton1Down(mouse)

local model = bin.Figure:clone()

model.Parent = game.Workspace
model:MakeJoints()
model:MoveTo(mouse.hit.p)

end

function onSelected(mouse)
mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end



bin.Selected:connect(onSelected)
Report Abuse
snakeeyes3O8 is not online. snakeeyes3O8
Joined: 30 Mar 2016
Total Posts: 252
06 May 2017 12:37 AM
its also using a Hopper bin tool so i dont know if that makes a difference but i do know that hoppers have been removed
Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37141
06 May 2017 12:42 AM
local bin = script.Parent
local enabled = true

function onButton1Down(mouse)

if enabled then
enabled = false

local model = bin.Figure:clone()

model.Parent = game.Workspace
model:MakeJoints()
model:MoveTo(mouse.hit.p)

end

function onSelected(mouse)
mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)

wait(1) -- reload time
enabled = true
end
end



bin.Selected:connect(onSelected)


I have a spider on my back.
Report Abuse
snakeeyes3O8 is not online. snakeeyes3O8
Joined: 30 Mar 2016
Total Posts: 252
07 May 2017 07:14 PM
it says attempt to call a nil value (x8)
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