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 the player press a button?

1 answer

✓ Accepted answer

Okay, so you mean if they're close to the button, like the button is off, and people need to touch it to activate it?

Make a part, and insert this script:

debounce = false

script.Parent.Touched:Connect(function(hit) -- detect if the player touched the brick
	debounce = true -- debounce
	script.Parent.BrickColor = BrickColor.Green() -- make the button's brick color green
	debounce = false -- debounce
end)

Uhh, yeah that's it! If you touched the button, the button will be activated, and the button will be green!

If you have more questions, suggestions, comment down below! And if this helped you, please mark this as the correct answer, thanks. Please, it means a lot of me! Don't ignore this message and if this helped you, mark this as the correct answer, thanks again!

1 comment

0

No, he obviously means pressing keys, requiring the UIS

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