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

Why does the if statement fire even if Owner = nil? [ANSWERED IN QUESTION]

Asked by 5 years ago
Edited 5 years ago
function onTouched()
    local Owner = script.Parent.Parent.owner.Value
    if Owner ~= nil then
    for i, v in pairs(script.Parent.Dropper:GetDescendants())
        do v.Transparency = 0
        do v.CanCollide = true
        end
        end
    script.Parent.DropperScript.Disabled = false
    script.Parent.Part:Destroy()
    end
end

script.Parent.Part.touched:connect(onTouched)
0
please tell us the *FULL* probl3m WideSteal321 773 — 5y
0
wdym PaliKai13 92 — 5y
0
Can you give a explanation of what you're trying to do with the Touched event? xPolarium 1388 — 5y
0
Like Polarium said, please describe what you are trying to do accomplish in your game by writing this script, and maybe take a picture of your explorer so we know what instance are parents to others and how everything is arranged. RetroGalacticGamer 331 — 5y

Answer this question