Basically, my friend got an error called "attempt to perform arithmetic (sub) on vector3 and number." The line of code that caused this is in this discord attachment link. https://cdn.discordapp.com/attachments/993644972224036965/1046595153818832926/image.png
the vector3 and number error message is in this discord attachment link. https://cdn.discordapp.com/attachments/993644972224036965/1046594002167804015/image.png he doesnt know how to fix this and a scripter isnt responding to him either so i made this question on how to fix this. hope maybe someone can help me. if its not understandable enough then i dont know??
I can’t view the code, if you could post it here I could be more of a help.
But from what I can tell you’re likely trying to subtract a number from a Vector3 value. Try removing the subtraction sign and see if it goes away. If it does then subtract the value some other way.
You are trying to subtract a Number from a Vector3 value. "monster.Position" is a vector3 value and cannot be in the same arithmetic as a different type of value (number)
Try: ~~~~~~~~~~~~~~~~~ if monster.Position.****Magnitude**** - handle.Position.Magnitude < 5 then ~~~~~~~~~~~~~~~~~
Adding magnitude will convert the vector3 into a single number.