You can’t set position with Position.X rather do this:
while true do
if debounce == 0 then
debounce = 1
task.wait(1.5)
script.Parent.Anchored = false
task.wait(1.5)
script.Parent.Anchored = true
script.Parent.Position = Vector3.new(3.575, 12.041, -40.556)
debounce = 0
end
end
I cant help but mention that youre being a little extra with the whole “debounce” thing.
If you want to move a parts location one time:
You do not need any waits() because your calling it to move once
You do not need a loop because youre moving the part once
You do not need to unanchor a part to move it because position is a property that part reads from. Changing a position will not go through the physics engine, rather the physics engine will read off the parts position
part.Position = Vector3.new(x,y,z)
Vector3 is a special datatype that is used to represent space in various ways. There are probably many better explanations on vectors online as opposed to what I could give you.