Nil value at LocalPlayer

Why am I seeing “nil” at player variable here while debugging, even though I’m in a LocalScript:
image

The breakpoint was on a click event, so Im sure the player was loaded

1 Like

There are two cases:

  1. This isn’t a LocalScript, you should switch it to that.
  2. Just erroneous display. If it does work, it’s probably just erroneous display.

It is a localscript, tho I’m not sure about it being erroneous display because ToggleTextVisibility function is not running, so I thought this nil has to do something with it
image

You are forgetting to call it.
coroutine.wrap(functionName)()

2 Likes

I thought the other brackets were optional, thank you!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.