Hello, recently I have been trying to make a pickup and put down script but I am having trouble with ‘:MoveTo’
Here is the code
local holderValue = script.Parent.Holder.Dialog.InitialPrompt
script.Parent.MouseClick:Connect(function(player)
if script.Parent.Pickup.Enabled == false and player.Name == holderValue then
print("this will never show up")
else
holderValue = "None"
script.Enabled = false
script.Parent.Pickup.Enabled = true
script.Parent.isHeld.Value = false
script.Parent.canPickup.Value = true
player.Character.Humanoid.JumpPower = 50
wait(.1)
script.Parent.Parent.Parent:MoveTo(Vector3.new(script.Parent.Parent.Position - Vector3.new(0,4.175,0))) -- This is where the problem occurs
end
end)
The problem is basically the model’s position is set to (0,4.225,0) when the position is supposed to be set to its original position before being put down and subtracting 3.175 from its Y position.