Health Boost

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

tatarararat

New Member
Feb 13, 2023
7
0
1
21
What am I doing wrong? Help please!

on pickup of slime ball:
if player is alive:
wait 3 ticks
remove every slime ball from the player
add 2 to level of health boost effect for {player}
 
What are you trying to do? And is the variable {player} set, or did you mean to use just player?
 
What am I doing wrong? Help please!

on pickup of slime ball:
if player is alive:
wait 3 ticks
remove every slime ball from the player
add 2 to level of health boost effect for {player}
you should probably read the syntax of skript, also you might want to listen to other events rather than just pickup, but that's just for later now, your issue is to do with syntax.

There is no need to check if the player is alive, because it's not possible to "pickup" an item when dead.

Code:
on pickup of slime ball:
    wait 3 ticks
    remove every slime ball from the player
    apply health boost of tier 2 to player for 10 seconds

haven't tested it out.
 
You can just set the max health of the player. To set attributes, too, I'm pretty sure you need an addon. Regardless, it's a solution that works and this post should be marked as solved if it's done.
 
Status
Not open for further replies.