I am trying to make my bottle fly when I press the left mouse button. No errors are in the output, however nothing happens.
~~~~~~~~~~~~~~~~~ --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)
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)
~~~~~~~~~~~~~~~~~