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

How come this won't make archivable true?

Asked by
Leyssia 25
7 years ago
headArmor = script.Parent.Parent.Parent.Parent:FindFirstChild("headArmorEquip")

script.Parent.MouseButton1Click:connect(function()
    if headArmor.Archivable == false then
        headArmor.Archivable = true
    else
        headArmor.Archivable = false
    end
end)


"headAmorEquip" is a folder

This is in a local script (not sure what difference between the 2 script types are)

I've also done it like...

headArmor = script.Parent.Parent.Parent.Parent:FindFirstChild("headArmorEquip")

script.Parent.MouseButton1Click:connect(function()
    if headArmor.Archivable == false then
        headArmor.Archivable = true
    end
end)



script.Parent.MouseButton1Click:connect(function()
    if headArmor.Archivable == true then
        headArmor.Archivable = false
    end
end)


0
Umm the first code is okay, but i don't think you can change the Archivable value in the game only in studio rustyhuskey 59 — 7y
0
I am curious why you made 2 of the same event.. Azmidium 388 — 7y

Answer this question