Why isn’t this function running when i click the Parent (it’s a text button)
script.Parent.MouseButton1Click:Connect(function()
local equipped = false
if swordname == player.equippedSword.Value then
equipped = true
end
print(2)
-- equip the sword
--player.equippedSword.Value = swordname
for i,v in pairs(script.Parent.Parent.Parent:GetChildren()) do
if v.Name == "SwordItem" then
v.TickIfEquipped.Visible = false
end
end
script.Parent.Visible = false
frameopen = false
equipped = true
script.Parent.Parent.TickIfEquipped.Visible = true
end)