So I want to clone an object, modify its parent and then modify its position to the current part's, then destroy the object. When a value goes under 0. Heres what I used:
if script.Parent.NumberValue.Value <= 0 then
Clone1 = game.ReplicatedStorage.InterestingParts.Part2:Clone()
Clone2 = game.ReplicatedStorage.InterestingParts.Part1:Clone()
Clone1.Position = Vector3.new(script.Parent.Position)
Clone1.Position = Vector3.new(script.Parent.Position)
Clone2.Position = Vector3.new(script.Parent.Position)
Clone2.Position = Vector3.new(script.Parent.Position)
script.Parent:Destroy()
end
This doesnt work and Im not sure why, can anyone help?

1 comment
Just tried it and it still doesn’t work. I have found the problem, which was that it only checked once so I set up a function to check. Thank you though.