Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I need help! It says. LocalPlayer(nil value)???

Asked by 4 years ago
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)
0
LocalPlayer isn't mentioned anywhere in the script. Are you sure this is the correct code snippet? Fifkee 2017 — 4y
0
Try game.Players.LocalPlayer.leaderstats.Rebirths Luka_Gaming07 534 — 4y

1 answer

Log in to vote
0
Answered by
zuup123 99
4 years ago

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)

Ad

Answer this question