Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Workspace.Prestige:3: attempt to index nil with 'leaderstats'?

How do i fix this error: Workspace.Prestige:3: attempt to index nil with 'leaderstats'

local plr = game.Players.LocalPlayer
script.GetPrestige.OnServerEvent:Connect(function()
	plr.leaderstats.Prestiges = plr.leaderstats.Prestiges +1
end)

5 comments

0

create the leaderstats lmao

0

i already made leaderstats

0

clearly didnt

0

lol im so dumb i need put plr next to function and erase the local plr

0

Bigger problem of yours is using game.Players.LocalPlayer in a server script...

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.