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: PLEASE HELP ME IM A NOOB

Previous Thread :: Next Thread 
Mezur is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
13 Dec 2015 08:24 PM
How can I make it so that once you click the part and receive the gold, the part disappears then comes back in 5 seconds?


function onClicked(hit)
local h = hit.Parent:findFirstChild("Humanoid")
if h == nil then return end
local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
if (Player ~=nil) then
Player.leaderstats.Gold.Value = Player.leaderstats.Gold.Value + 100
end
end
script.Parent.Touched:connect(onClicked)
Report Abuse
Mezur is not online. Mezur
Joined: 29 Jun 2015
Total Posts: 3040
13 Dec 2015 08:26 PM
1
Report Abuse
AuroJosh is not online. AuroJosh
Joined: 04 Oct 2015
Total Posts: 484
13 Dec 2015 09:10 PM
MAKE SURE THERE IS A CLICK DETECTOR IN THE PART

Script:

brick = script.Parent:Clone()

function onClicked(plr)
plr.leaderstats.Gold.Value = plr.leaderstats.Gold.Value + 100
script.Parent:Destroy()
wait(5)
brick.Parent = game.Workspace
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)



#code print("Who is this you speak of?".."Dis is AuroJosh!")
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