auto block replace

  • 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 community!

    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!

DannyDaMannyy

Member
Dec 16, 2023
20
1
3
Trying to make a simple skript that replaces blocks that are broken after a given amount of time. Yah, that's it, but you won't believe how much pain it has caused me. When a player breaks a block, I can't cancel the event after 24 hours, so "cancel event" wont work. The only other way is to set a variable to the block type and location, and then have it refer to those variables after 24 hours to put blocks there. But ive tried TONS of ways of doing this, and can't get anything that works. The following Skript doesnt have any errors, but doesn't work. The block does not get replaced. Any help appreciated!!
Code:
on break:
    wait 3 seconds
    set {_location} to location of event-block
    set {_block} to type of event-block
    set block at location at {_location} to {_block}
 
on break:
wait 3 seconds
set {_location} to location of event-block
set {_block} to type of event-block
set event-block to {_block}
I don't know if this will work but I will try to help.
 
Ah... Thank you, but that doesn't work either. I may have to do all the blocks manually, such as:
Code:
on break of grass:
    wait 5 seconds
    set event-block to grass
    
on break of stone:
    wait 5 seconds:
    set event-block to stone

etc, etc....

Which is goinig to suck, but I think its all i can do rn.