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

How to make a on clicked regen button? [closed]

Asked by 8 years ago

Hey everyone, I was wondering how to make a regen button, on clicked, aswell as if possible only certain players can.

0
Can you post your code? User#5423 17 — 8y

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 8 years ago
Edited 8 years ago

I only can remember publicly clicked, but here's what you need to do.

First, insert a ClickDetector into the Part you want to be used.

Next, insert a Script into the part

Now, insert this into the script:

(NOTE: This is just the functioning; there are different methods of Regenerating a part or game, so you insert your own method.)

function OnClicked()
-- This is where you insert your method.
end

script.Parent.ClickDetector.Clicked:Connect(OnClicked)

I hoped this worked, and wasn't confusing at all for you.

Ad