I cant get the cashiers position to change when the event is triggered

Screen Shot 2022-08-26 at 1.33.14 PM
the cashier is in a folder called NPCS if this helps

Is that a Script or a LocalScript? Also, do you get any errors?

Issue is probs ur missing the dot here:


1 Like

it’s a script an the error says “Workspace.ShopliftDetection:13: Incomplete statement: expected assignment or a function call”

Do you have a custom event called .Position? You have to connect the function to an actual event, not just a property.

1 Like

when i put the dot it says "Origin is not a valid member of Model “Workspace.NPCS.Cashier”

That means that there is nothing called “Orgin” inside of the Modal which is “Workspace.NPCS.Cashier”.

Removing the dot is not gonna do anything. Tbh I kinda feel you might wanna learn how to code cuz it’s clear you don’t at all.

This thread may help you with your problem:

First off: You cannot use a model’s OriginPosition in scripts. Use PivotTo to move models (thanks to Nilociety for telling me this exists).
Secondly: When working with three values, such as position or rotation, you need to put the values in a Vector3.new().
Third: You aren’t even detecting when the event is triggered!


doesn’t detect anything, thus making any code encased in it useless.
If you want to detect the change in a value, use Value.Changed.

You might want something like this: script.Parent.NPCS.Cashier.Active.Changed:Connect(function() --stuff here end)

1 Like

SetPrimaryPartCFrame is deprecated. Do not use it for new work. Instead, use PivotTo. It’s the exact same as SetPrimaryPartCFrame, except it doesn’t need a PrimaryPart to work.

To OP, it appears your code is not written correctly, and it’s likely that you probably need to reach out to YouTube tutorials, or the Developer Hub to learn.

1 Like