Gravity Controller Query - Region3 and Button Toggle

  1. What do you want to achieve? Keep it simple and clear!
    A. I’d like to make a Region3 that de-activates the gravity controller when a player is inside it.
    B. I’d like to make a button which can be used to toggle the controller on and off - this is currently mapped to the letter K via some code in a script. I feel like both of these are similar problems.

  2. What is the issue? Include screenshots / videos if possible!
    Link to useful info I found on the main thread : Wall stick/Gravity Controller - #238 by EYYCHEEV
    A. I have a working Region3 that can detect players but I don’t know how to instruct this Region3 to affect the players LocalScript (the one mentioned in the post) to turn the gravity on and off.
    B. I have a GUI button but I’m unsure how to add a script to my button that triggers a behaviour in another script (A script that isn’t parented to the button being clicked).
    (I’m new to scripting and don’t know how I can get scripts to call functions in other scripts - Any tutorial recommendations on this would be helpful. I’m watching a lot of AlvinBlox at the moment and its very useful.)

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    A. I’ve been working my way through a lot of popular Roblox Studio tutorials on YouTube. I enjoy learning through videos but the Roblox dev pages are also very useful too.
    B. I used this to learn how to make buttons : Buttons and Text Input | Roblox Creator Documentation (I’m still trying to learn how to make a button call a function from another script that it is not a parent of - maybe I need two scripts?)

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
I’m a bit stuck because I’ve never tried anything like this before. I’m learning how to make small games to improve my skills but I haven’t come across any problems like this in the basic games I’ve made so far. I’ve made buttons do different things before but normally it is all contained within a script with the button as the parent. (hope that makes sense)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

I like to make scripts by myself. Don’t write it for me. Even though the Gravity Controller is too complex for me to understand completely I would like to learn how I can use it and other amazing Roblox assets in my games.

Thanks for reading! :slight_smile: