For example you have a button that is activated by pressing v and i want to force the player to press v.
✓ 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.

2 comments
Learn how to do this first.
https://developer.roblox.com/en-us/api-reference/class/UserInputService