Need help for making a research tree

Hello, I’m making a research tree, it appears that it worked, but only the first one, others didnt.

Here’s the script

local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local Data = plr:WaitForChild("Data")
local Currency = Data:WaitForChild("Currency")
local ResearchPoints = Currency.ResearchPoints

local Button = script.Parent -- Button
local Successor = Button.Successor -- StringValue, next research

local Researchable = Button.Researchable -- BoolValue, checks if you can research it or not
local Researched = Button.Researched -- BoolValue, checks if it's already researched

	if Researchable.Value == true then
		if ResearchPoints.Value >= 50 then
			ResearchPoints.Value = ResearchPoints.Value - 50
			Researched.Value = true
			Button.Parent[Successor.Value].Researchable.Value = true
		Researchable.Value = false

You don’t need to use this because it will fire the event every time a player joins, not to you.

This is incorrect. Use instead

Researchable.Value = true

that will set a successor’s researchable value which checks if you can research it or not, to true

Are there more than one Successor?

Are you trying to get one of them?

no, that will get the sucessor’s name