I hit the lid, and it didn't like put it in the position I wanted it to be. This is what the script is:
local lid = game.Workspace.BoxCD.Lid
sound = Instance.new("Sound")
function onClicked()
if onClicked(lid) then
lid.CFrame = CFrame.new(9.445, lid.CFrame.Y, lid.CFrame.Z)
wait(0.1)
lid.CFrame = CFrame.new(8.205, lid.CFrame.Y, lid.CFrame.Z)
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

2 comments
You're expecting a function call to return a true or false value to a if then statement that does not return one. Is this script parented to 'lid'?
Oh okay. Thanks M39