local rebirth = game.Players.VenyxAllDayBaby.leaderstats.Rebirths local close = script.Parent.Frame.Close local frame = script.Parent.Frame local whole = script.Parent if rebirth.Value == 40 then frame.Visible = true end close.MouseButton1Down:Connect(function() whole:Destroy() end)
You are trying to index a nil value, you didn't mention LocalPlayer anywhere, make a local script and put this:
local rebirth = game.Players.LocalPlayer.leaderstats.Rebirths --Use LocalPlayer instead local close = script.Parent.Frame.Close local frame = script.Parent.Frame local whole = script.Parent if rebirth.Value == 40 then frame.Visible = true end close.MouseButton1Down:Connect(function() whole:Destroy() end)