Detecting if the player is in the water is pretty simple, just check for water blocks at its foot and head coordinates. But it is not possible to detect if the player (or other entities) are in the rain.
How to detect water breathing in Minecraft Java?
You can detect players who gained the water breathing effect while underwater (but not players who had water breathing beforehand) with @a [scores= {difference=0..},nbt=! {Air:300s}]. It fails to detect players the exact tick they take damage from drowning.
How to select players with a water breathing effect?
Between the two /execute commands, you can select underwater players using the selector @a [scores= {difference=1..}]. It fails to detect players who are underwater with a water breathing effect (which doesn’t matter at all if what your command does is give players water breathing).
How to detect when a player has touched terrain?
A Part called ClearButton to finish the course and disable the timer (overlap debug) Here are the scripts (they do all work and if you correct me you will be wrong):
What to do if a player is swimming in water?
Depending on what kind of system you’re making that relies on the character swimming, you can use a LocalScript instead of a server one. If it’s game-critical stuff or shouldn’t be handled by the client, then you can use the server. Naturally the if statement would only run once.
What do you need to know about waterlogging in Minecraft?
Waterlogging is the mechanic that allows non-cube blocks (that is, blocks that do not completely fill their block volume, such as doors, ladders, and plants) to be filled with a water source block. Both the non-cube block and the water source block occupy the same space. If the non-cube block is destroyed, the water source block remains.
How do you spawn a water item in Minecraft?
The Water item can be spawned in Minecraft with the below command. Cheats must be enabled before this will work. If you are running the Essentials plugin, you will need to run /minecraft:give instead of simply /give. This is because the Essentials /give command overrides Minecraft’s built-in command.