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)
COMMUNITY QUESTION
I need help! It says. LocalPlayer(nil value)???
1 answer
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
LocalPlayer isn't mentioned anywhere in the script. Are you sure this is the correct code snippet?
Try game.Players.LocalPlayer.leaderstats.Rebirths