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

I've tried for a while to make this bottle go up. It's not working any help?

Asked by 7 years ago

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)

0
But your script in LUA DjinoKip 78 — 7y

Answer this question