Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I need help?

Hello, Helpers, i was wondering if you could IN DETAIL tell me how to make a script that when you click on it will remove the parent of the script and give you 1 money "remember to make leaderboard for me" so basically I want this where you click on it will remove the parent which is the tree then gives you money then wait 30 seconds later and respawns it

1 answer

Pretty simple, I'm pretty sure the wiki tutorials would have covered how to do this. I honestly think you should read the wiki rather than asking, I know its ok to ask but most of this stuff is covered on the wiki, which provides some of the best answers, but oh well. Heres a script. Make sure its in a regular script.

script.parent.ClickDetector.MouseClick:connect(function(player) -- wait for clickdetector inside of tree to be clicked
	player.leaderstats.Money = player.Leaderstats.Money + 1 -- Add 1 Money to leaderstats
	script.Parent.Parent = ServerStorage
	wait(30
	script.Parent.Parent = game.Workspace
end)	

Like I said, all on the wiki.

http://wiki.roblox.com/index.php?title=Leaderboard http://wiki.roblox.com/index.php?title=API:Class/ClickDetector http://wiki.roblox.com/index.php?title=How_to_Make_a_Model_Regenerate

This discussion is preserved as it was. New answers, comments, and votes are closed.