#How to use e.player.is[statement] in a server Script (PlayerEvents.tick)

20 messages · Page 1 of 1 (latest)

covert kindle
#

I would want to test this statement in my server_script :

if (event.server.player(event.player.uuid).isUnderWater) ???
if (event.server.player.isUnderWater) ???
if (event.player.isUnderWater) ???

trail oracleBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

rough tapir
#

generally if something starts with is, that means its a method

#

player.isUnderWater()

covert kindle
#

Yeah I know

#

But this is client side or server side
I need it to be both

#

To use it in server scripts

rough tapir
#

wha hmmm

#

if its player tick event, its server side

covert kindle
#

When I do :

let value = event.player.score("value",`${event.player.uuid}_data`)

[21:30:39] [ERROR] ! waterbar.js#26: Error in 'PlayerEvents.tick': TypeError: Cannot call property score in object class_3222['Nicocrafti0102'/6, l='ServerLevel[New World]', x=-82.60, y=7.00, z=232.43]. It is not a function, it is "number".

rough tapir
#

it says there its not a function

#

what does that have to do with the topic of this thread tho

covert kindle
#

It's another exemple

#

I just want to use the e.player.#### in a server script

rough tapir
#

okay

#

but youre being super vague about this

#

xd

covert kindle
#

I would want that my variable or if statement that is an e.player.#### to be executed in the same script as e.server.#### things on server side

#

" without errors "