Unnecessary Warnings

Simple question- how can I get rid of these warnings? The script works as its intended to, but the warnings are there for a reason of some sort. They are all in the same script.

  1. What does the warning mean?
  2. How can I fix it?

2 Likes

the playerGui and character is neither a string or a Player which you have set in the variables.

Don’t define the player argument as class Player, that’s probably going to get rid of the warns. You might need to add an if statement checking if moderator.Character exists for the second warn.

Is this a localscript? If it is, just define “player” as Players.LocalPlayer

You must’ve defined a player class instead of using the built in one

I define variable player classes (built-in) and I don’t get these warnings at all. In fact, they get suggested in the keyword suggestions.

Try reinstalling Studio. If that doesn’t work, it may be a bug.