#Cannot find Player in module script

1 messages · Page 1 of 1 (latest)

flint plover
#

I have no idea whats going on, when I try to find player in a server script, it works but when i try in module script it doesnt??

lucid magnet
#

i believe you need to pass the player in as module scripts doesn't know who the player is

flint plover
lucid magnet
#

yes. I just read the text and didn't see the picture.

#

so

flint plover
#

what can I do?

lucid magnet
#

try to put the plr variable at the start of the code so it is already locked in

trail wadi
#

you got a bit confused and you're getting me confused

#

when you call a table function with ":" you're passing itself automatically as first paraam

#

do you know that?

#

I don't know why you're calling it like that

flint plover
#

i havent used studio for like 1 or 2 years

trail wadi
#

yeah you can have 1 day of experience but then why would you use :

#

do

#

.StartFight(...)

flint plover
#

isnt that how you fire functions.....?

#

oh

trail wadi
#

: is esentially thinked to methods for oop replication

flint plover
#

thanks

#

it actually did work

#

top 10 dumbest mistakes in coding history

#

still not worse than this that i accidentally did

#

thank you so much