No errors, could anyone identify the problem with my script?

0 Errors, I have 0 clue why my script isnt working. it seems to be a problem with the x.Parent.Claimed Line

local t = {workspace.kisok.rega1.SurfaceGui.claimreggy, workspace.kisok.rega2.SurfaceGui.claimreggy, workspace.kisok.rega3.SurfaceGui.claimreggy}
local player = game:GetService("Players").LocalPlayer
local claimed = {workspace.kisok.rega1.SurfaceGui.claimed.TextLabel, workspace.kisok.rega2.SurfaceGui.claimed.TextLabel, workspace.kisok.rega3.SurfaceGui.claimed.TextLabel}
local claimedf = {workspace.kisok.rega1.SurfaceGui.claimed, workspace.kisok.rega2.SurfaceGui.claimed, workspace.kisok.rega3.SurfaceGui.claimed}
local gui = player.PlayerGui:WaitForChild("Menui")


for _, x in pairs(t) do

	for _,v in pairs(x:GetDescendants()) do

		if v:IsA("TextButton") then
			v.MouseButton1Click:Connect(function()
				if player:GetRankInGroup(10124474) > 0 then
					claimedf.Visible = true
					x.Parent.claimed:WaitForChild("TextLabel").Text = player.Name
				end
			end)
		end
	end
1 Like

Can you please try putting print scripts at different points?
For example, one at the mouse button click stage, one after the get rank in group stage, and so on