Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I need help? [closed]

Asked by 7 years ago
Edited 7 years ago

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

Closed as Not Constructive by evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
H4X0MSYT 536 Moderation Voter
7 years ago

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

Ad