I am trying to make a script when a player hits a brick a part moves only if the player has a badge. I have a script that makes sense to me but I’m not too sure what’s wrong with it. If someone could help much would be appreciated.

I am trying to make a script when a player hits a brick a part moves only if the player has a badge. I have a script that makes sense to me but I’m not too sure what’s wrong with it. If someone could help much would be appreciated.

I think I see the issue, at line 2 of your code, I assume you’re indexing some sort of value object, and based on where you check to see if the player owns the badge, you never actually index the Value field of the object.
So the fix is simple:
badgeholder = script.Parent.BadgeID.Value
I would also recommend setting the CFrame of the part and not the position, using CFrame will assure that the part’s position is set specifically to what you pass in regardless of collision.
Hope this helps!