So I am trying to make a bottle 'fly' up when the mouse button is held down, I dont recieve any errors so I wondering what is not working
I'm new to scripting :P so there may be obvious mistakes
mousedown = false
local player = game.Players.LocalPlayer local mouse = player:GetMouse()
mouse.Button1Down:connect(function() mousedown = true local part = game.Workspace.BOTTLE while mousedown == true do part.Anchored = false part.Position = part.Position + CFrame.new(0,0.1,0) end 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 = false else part3.Anchored = true end end)