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.

Solved Keep players in the water from sinking

Discussion in 'Skript' started by YK_DZ, Jan 19, 2022.

Thread Status:
Not open for further replies.
  1. YK_DZ

    YK_DZ Member

    Joined:
    Jan 14, 2022
    Messages:
    24
    Likes Received:
    0
    I want players in the water not to sink unless they hold their shift.
    I have no clue about it. How should I achieve it?
     
  2. Best Answer:
    Post #2 by Allan Noyd, Jan 19, 2022
  3. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    48
    Likes Received:
    0
    I coded an off-brand Origins mod for my server which could not have real mods installed. I did this for Merling.
    Code (Text):
    1. every tick:
    2.     loop all players:
    3.         if the block at loop-player is a water, a seagrass, a tall seagrass, a kelp or a kelp plant:
    4.             set loop-player's gravity to off
    5.         else:
    6.             set loop-player's gravity to on
    They will still sink in waterloged blocks tho.
     
  4. YK_DZ

    YK_DZ Member

    Joined:
    Jan 14, 2022
    Messages:
    24
    Likes Received:
    0
    Oh, I'm surprised.
    In fact, I'm also writing a racial system which is similar to Origin mod for my server.
    And thanks for your help, it worked!

    By the way, I also add
    .... bubble column or coral or coral fan:
    So that players can not sink in more type of water! :emoji_slight_smile:
     
    #3 YK_DZ, Jan 19, 2022
    Last edited: Jan 19, 2022
Thread Status:
Not open for further replies.

Share This Page

Loading...