I want to make a button that resets a car that the player is driving. It is getting the correct model, and it seems to be working, but the model does not move to its pivot, instead the pivot gets moved to where I want it to, but not the car.
It is important to note that the script does work for the first time it is called. But every subsequent time it looks like this:
Its also worth stating that the model clips into the ground when it is moved, if that shifts it for some reason.
local already=false
game.ReplicatedStorage.Redoer.OnServerEvent:Connect(function(player,model)
print(model)
if not already then
already=true
local Cframe=model:GetPivot()
model:PivotTo(CFrame.new(0,0,0))
--model:PivotTo(CFrame.new(Cframe.Position.X,Cframe.Position.Y+10,Cframe.Position.Z))
wait(1)
already=false
print("b")
end
end)
Why is :PivotTo() behaving like this? And how do I get it to move the model?