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

How to make a on clicked regen button?

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

1 comment

0

Can you post your code?

1 answer

✓ Accepted answer

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.

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