Why doesen't this skript work i get no error

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

Ceekay

New Member
Nov 16, 2024
5
0
1
this skript does nothing it does not set the block
Code:
on break:
    set {_block} to event-block's type
    set {_loc} to location of event-block
on break:
    if {_block} is stone bricks:
        set block at {_loc} to cracked stone bricks
on break:
    if {_block} is cracked stone bricks:
        set block at {_loc} to cobblestone
 
I think that skript only recognizes stone brick, no s. try that for both, your skript is working
 
this skript does nothing it does not set the block
Code:
on break:
    set {_block} to event-block's type
    set {_loc} to location of event-block
on break:
    if {_block} is stone bricks:
        set block at {_loc} to cracked stone bricks
on break:
    if {_block} is cracked stone bricks:
        set block at {_loc} to cobblestone
you cannot use local variables outside where it defined. You have to use event-block and event-location for {_block} and {_loc}.

Like:

code_language.skript:
on break:
    if event-block is a stone bricks:
        set block at event-location to cracked stone bricks
    else if event-block is a cracked stone bricks: # don't forget else or your block will be cobblestone immediately.
        set block at event-location to cobblestone # or location of event-block


You can do set event-block to %block type% too. It depends on your preferations.