Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Bottle fly issue? -- Code finally put in correctly

Asked by 8 years ago

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)

    ~~~~~~~~~~~~~~~~~
0
Is your script in a part? Is your script a local script? VinnyTheButcher 278 — 8y
0
lol Volodymyr2004 293 — 8y

Answer this question