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

Why does the bottle fall through the table? both CANCOLLIDES are true!

Asked by 7 years ago

both can collides are true

ply = game.Players.LocalPlayer
mouse = ply:GetMouse()
rise = false
part = game.Workspace.WBM.Union
secs = 0.3
win = false
fall = false

--NEED TO EDIT PROPERTY OF PART2 TO MAKE IT HAVE NO EFFECT ON BOTTLE

--creates function
function Up()
    part.CFrame = part.CFrame + Vector3.new(0,secs,0)
end







--leftROTATON

function Leftmove()
    part.CFrame = part.CFrame * CFrame.Angles(0.1,0,0)
end

function LeftDown()--need to have this to mantain anchor, but have down motion
    part.CFrame = part.CFrame - Vector3.new(0,0.5,0) --speed of decsent 
end







--RightRotation



--creates loop
while true do
mouse.Button1Down:connect(function() --- something stops, the verification??
    rise = true
    part.Anchored = true 
end)

mouse.Button1Up:connect(function()
    rise = false
    fall = true
    part.Anchored = true
end)

if rise == true then--up motion
    Up()
    Leftmove()
else if fall == true then 
    LeftDown()--down motion
    Leftmove()

end

game.Workspace.WBM.Union.Touched:connect(function(hit) --reset
    local find = hit.Parent:FindFirstChild("toptable")
    if find ~= nil then
        rise = false --problem?
        fall = false
        part.CFrame = CFrame.Angles(0, 0, 0)
        part.CFrame = CFrame.new(12.37, 2.98, -19.72)
        win = false
        wait(0.01)
    else 
        win = true
    end
end) --- need to use variable, left from movement script somehow
----change in rotation, due to reset
wait(0.01)
end--AFTER RESET SOMETHING HAPPENS,  THEREFORE RESET AFFECTS OTHER THINGS, Need to reset rotation
wait()
end





















Anyone see anything that would cause the bottle to fall through the table?

Answer this question