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

Why is hit nil?

Asked by 10 years ago

cscript = script.Parent:WaitForChild("CutsceneScript")

fish = false
faucetque = true
camara = true

function firstcut(hit) if not fish then fish = true if hit.Parent:findFirstChild("CutsceneScript") then return end local cutsceneScript = cscript:clone() cutsceneScript.Parent = hit.Parent cutsceneScript.Disabled = false fish = false if script:findFirstChild("SkipCutsceneGuiValue") then if script.SkipCutsceneGuiValue.Value ~= nil then script.SkipCutsceneGuiValue.Value:Destroy()

    workspace.CutscenePlayer:remove()

    end
        end
end

end workspace.Vent.ventcap.ClickDetector.MouseClick:connect(firstcut)

--faucetque = false after
function faucetclicked()
    print("Water Pressed")
        workspace.CamLight.BrickColor = BrickColor.new("Bright green")
        workspace.Faucet.Water.BrickColor = BrickColor.new("Bright bluish green")
    faucetque = 3<4
    workspace.Faucet.Water.ClickDetector:remove()

end
workspace.Faucet.Water.ClickDetector.MouseClick:connect(faucetclicked)
--camara = false after
function camclicked()
    print("Camara Clicked")
    workspace.Camlen.BrickColor = BrickColor.new("White")
    camara = 3>4
    workspace.Camlen.ClickDetector:remove()
end
workspace.Camlen.ClickDetector.MouseClick:connect(camclicked)

workspace.Vent.ventcap.ClickDetector.MouseClick:connect(function(vencap) if faucetque and camara == false then

 firstcut()

print("everything went well")
else 
    error = Instance.new("Message")
    error.Parent = errorM
    print("there was an error")
    error.Text = "Not yet there is still things left to do"

end 

end)

1 answer

Log in to vote
0
Answered by 10 years ago

Can we see the full script + connection line?

0
There raspyjessie 117 — 10y
Ad

Answer this question