Button script doesn't work

Hello. I wrote a script that takes their values ​​from the folder with variables and if it is false, moves the frame in which this script is located to another frame. To make it clearer I will attach a photo.
Screenshot_3

The problem is that the frame only moves once. According to the idea, it first lies in NotingSkills, after the player clicks on it it moves to PlayerSkills

local Values = script.Parent.SkillsFrame.Values
for _, object in ipairs(Values:GetChildren())  do
	if object:IsA("BoolValue") then
		if object.Name == "Speed" and object.Value == true then
			print("okey")
		end
	end
	if object:IsA("BoolValue") then
		if object.Name == "Speed" and object.Value == true then
			print("no")
		end
	end
end

3 Likes

I dont really get the explanation. You want when bool value called same as frame in variables is false the speed frame changes the parent on playerskills frame?

Sorry for late answer. I want that when I click on the button in which this script. It was moved to PlayerSkills (originally it was in NotingSkills) and the variable in the Values ​​folder with the same name was changed to true