How I do correctly fix this Verse Code? Error "if"

I was following a tutorial on YouTube, and left out and changed some of the code to fit my needs on what the creative prop is suppose to do. On the video the person never got an error like this. I did some research and tried to put a “:” after the “if” and still got an error. I have also tried using the “block:” as well, and still have the error.

Screenshot of the code is below.

Any info would be greatly appreciated. Thank you.

Agent.GetFortCharacter is a function, so you need to call it, since it decides you’ll call it using square brackets

Agent.GetFortCharacter[]

Another thing, you don’t need to cast Player to the agent type since player is a subtype of agent

AllPlayers is not a method, it’s a variable, no need to call it

You’re missing : at the end of your if statement

You should probably do more tutorials at this point

1 Like

Again, I was just following what the person was putting/saying and implementing on the YouTube video. Thanks for the info and will try try and update it.

1 Like

Didn’t mean to sound aggressive tbh, but there was just a lot of mistakes there

GL and have fun making those scripts, Verse is crazy good!

1 Like