Having issues setting player attributes using temporary variables

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

aeasone

Member
Jun 25, 2025
4
0
1
Currently i have it set for players to refresh their attributes on join, and i have a separate line with the scale variable working:
Code:
set player's scale attribute to product(arg-1,{_cm.mod})

but when i sub the attribute name for a preset variable (which is a list of the valid attributes), it will log the change correctly, but the player attributes in game will not change.

Code:
on join:
    set {_s} to {species.%player%}
    loop {species.attributes::*}:
        set {_a} to loop-value
        send "%{_a}%"
        set player's {_a} attribute to {species.attribute.%{_a}%.%{_s}%}
        log "%{_a}%: %{species.attribute.%{_a}%.%{_s}%}%" in "dev/var/species/feature/attributes/%UUID of the player%"
    log "----------------" in "dev/var/species/feature/attributes/%UUID of the player%"

current list for {species.attributes::*} is:
Code:
    add "armor" to {species.attributes::*}
    add "armor toughness" to {species.attributes::*}
    add "attack damage" to {species.attributes::*}
    add "attack knockback" to {species.attributes::*}
    add "attack speed" to {species.attributes::*}
    add "block interaction range" to {species.attributes::*}
    add "burning time" to {species.attributes::*}
    add "entity interaction range" to {species.attributes::*}
    add "explosion knockback resistance" to {species.attributes::*}
    add "fall damage multiplier" to {species.attributes::*}
    add "gravity" to {species.attributes::*}
    add "jump strength" to {species.attributes::*}
    add "knockback resistance" to {species.attributes::*}
    add "luck" to {species.attributes::*}
    add "max health" to {species.attributes::*}
    add "mining efficiency" to {species.attributes::*}
    add "movement efficiency" to {species.attributes::*}
    add "movement speed" to {species.attributes::*}
    add "oxygen bonus" to {species.attributes::*}
    add "safe fall distance" to {species.attributes::*}
    add "sneaking speed" to {species.attributes::*}
    add "step height" to {species.attributes::*}
    add "submerged mining speed" to {species.attributes::*}
    add "water movement" to {species.attributes::*}