I need help with skript attributes

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

Sccout

Member
Jan 22, 2026
2
0
1
I'm trying to add attributes with functions but i get and error every time on line 16 17 18 and 19

function applyAttributes(p: player):
if {hearts::%{_p}%} is not set:
set {hearts::%{_p}%} to 20
if {speed::%{_p}%} is not set:
set {speed::%{_p}%} to 1
if {damage::%{_p}%} is not set:
set {damage::%{_p}%} to 1
if {luck::%{_p}%} is not set:
set {luck::%{_p}%} to 0
if {armour::%{_p}%} is not set:
set {armour::%{_p}%} to 0
if {size::%{_p}%} is not set:
set {size::%{_p}%} to 1
set max health of {_p} to {hearts::%{_p}%}
set walk speed of {_p} to 0.2 * {speed::%{_p}%}
set attribute generic attack damage of {_p} to {damage::%{_p}%}
set attribute generic luck of {_p} to {luck::%{_p}%}
set attribute generic armor of {_p} to {armour::%{_p}%}
set attribute generic scale of {_p} to {size::%{_p}%}