determining the block the player is placing on

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

adamsmashem

Member
Jul 13, 2023
2
0
1
23
So basically, I want a skript that does this:
When a player places a button, the block he placed the button on should turn into glass.
using event-block or target block both refer to the button that was placed, not the bock it was placed on. Ive also tried block behind event-block and this works fine on all 4 sides, but not for the top or bottom of the block.
 
What you could do is something with coords and checking the orientation. For example, setting the event-block to a variable (To check the orientation of it for later); then when the player presses the button you could check the orientation (Ie: On the ceiling, floor, etc) and using that you can input a numerical data from the position of the button to turn it to glass (Ie: Button is on ceiling > Set the block above it to glass, button is on ground > set the block below it to glass, etc, etc).