How to set a block to a block name stored in a variable

  • 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 our Wiki for downloads and any other information about Skript!

Status
Not open for further replies.
Basically im making regenerating blocks which when you break, it replaces it with what it was so i need {rb.block.%event-block%} to set the block to what it was before it was broken. so i need it so {rb.block.%event-block%} is different even if the same block was placed down but in a different posittion because i also have {rb.player.%event-block%} so i can see if the player breaking the block is the owner of the regenerating block and the players can have multiple RegeneratingBlocks placed down.
I'm sorry for confusing you.
[doublepost=1566239419,1566239168][/doublepost]If theres a way too easily set a block to what it was before it was broken then that would be fine
 
H3A the block wont always be coal ore, i could place down iron_ore then it wouldnt work with that and ive tried that alooooot
 
Issue there is you are setting {block} to a string type...

To do what you want:
code_language.skript:
on break:
    set {BLOCK::BROKEN::%player%} to event-block
    add event-block to {BLOCKS::BROKEN::%player%::*}
 
Create a list then, If it's randomized.
Else just make a function.
 
Status
Not open for further replies.