Problem with anchoring on the client

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
  • I need to know how I can fix this problem.
  1. What is the issue?
  • This is all on the client: I am spawning an NPC with a hitbox part that is anchored, when the NPC spawns I am un-anchoring the hitbox and then printing the anchor status. In the output, it says that the hitbox is not anchored but when I check the workspace it says that it is (video below)
  1. What solutions have you tried so far?
  • It does work properly on the actual Roblox launcher/player but I want it to work in the studio.
  • I have tried restarting Roblox Studio, and even re-installing but it still won’t fix.

/ video /

I’m guessing the local script isn’t in the workspace? If so, then you’ll want to move the local script to any player containers, and if needed, change any variables (script.Parent for example).
NOTE: I noticed you parented the hitbox then changed the anchor property. It’s best to parent after you changed all other properties.

If it’s not in the workspace, then it could be that the spawnHitbox variable might not be assigned to the correct hitbox you want.

I’m not too sure about this because I don’t know how you scripted it, and I’m not very familiar with rigs and characters, but I hope you find a fix!