1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Effect in one world

Discussion in 'Skript' started by Matias Lund, Jan 25, 2021.

Thread Status:
Not open for further replies.
  1. Matias Lund

    Matias Lund New Member

    Joined:
    Jan 25, 2021
    Messages:
    5
    Likes Received:
    0
    Hey, so i'm very new to skript and i would like help with a problem. So i want to give an effect in one world. So when the player joins the world he automatically gets an effect.

    This is my script for now:

    if player is in world "Void":
    apply potion of speed of tier 1 to player for 30 minutes
    else if player isn't in world "Void" don't apply

    ^^ The problem is that i still have the effect in other worlds. So how do i cancel the effect when i return to another world? And how do a apply to the player when he joins the world?

    Thanks :3
     
  2. Ankoki

    Moderator Supporter Addon Developer

    Joined:
    Nov 5, 2020
    Messages:
    55
    Likes Received:
    12
    you can check on enter of the world, if its not the void world, remove potion effect of speed
    note you don't need the 3rd line it just won't do anything if not in that world:emoji_stuck_out_tongue:
     
    • Friendly Friendly x 1
  3. Matias Lund

    Matias Lund New Member

    Joined:
    Jan 25, 2021
    Messages:
    5
    Likes Received:
    0
    Sorry but i'm very new to this. Can you explain it in an other way?

    Sorry ...
     
  4. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    Code (Text):
    1. if player is in world "world":
    2.     apply speed 2 to player
    Sorry im not exactly sure what the syntax for applying a potion effect is but you could probably guess what I mean
     
Thread Status:
Not open for further replies.

Share This Page

Loading...