Custom Armor

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

Status
Not open for further replies.

_xD_Dx_

Member
Mar 28, 2023
1
0
1
18
So what I am trying to do is basically change the player's speed with boots.

issue:
When I put it on it sets my speed to 2, but when I take it off, or change my armor it doesn't change it back.

I use the latest version of skript as of now.
Here is what I did (at least tried):

Code:
on load:
    set {CustomItem::SpeedBoots} to netherite boots named "&3Speed Boots" with lore "&7SPEED!!!"

on armor change:
    if event-itemtype is {CustomItem::SpeedBoots}:
        set player's walk speed to 2
    else:
        set player's walk speed to 1
 
The issue is that you're checking the event-itemtype. The event item will always be the boots, whether you are equipping them or taking them off. This is because it is the item associated with the event, not the item in the player boots slot.

Therefore, instead of
Code:
if event-itemtype is {CustomItem::SpeedBoots}:
Do
Code:
if player's boots is {CustomItem::SpeedBoots}:

If that doesn't work, try waiting 1 tick before checking the player's boots.
Peace!
 
Status
Not open for further replies.