--creates bottle up on click
mousedown = false
part = script.Parent
starteddown= 0
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Button1Down:connect(function()
mousedown = true
while mousedown == true do
part.Anchored = true
part.Position = part.Position + Vector3.new(0,0.3, 0)
print("Button one down")
wait()
end
end)
mouse.Button1Up:connect(function()
mousedown = false
script.Parent.Anchored = false
end)
--need to create down motion
--checks if hit
local part3 = game.Workspace.BOTTLE.Union
part3.Parent.Touched:connect(function(hit)
local find = hit.Parent:FindFirstChild("top")
if find ~= nil then
part3.Anchored = true
else
part3.Anchored = false
end
end)
No errors pop up in the output, the bottle just doesnt leave the table when the mouse is held down

1 comment
I'm confused as hell right now. I'll see if I can fix this.