So I'm trying out scripts in a game, but this script that's supposed to print out a specific value, (berryID.Value) only works 50% of the time, even with no changes to the script (or any script) between testing. When it doesn't work, it outputs "playerStats is not a valid member of Player" even though it clearly is. Anyways, here's the script, hope someone can help:
`
game.Players.PlayerAdded:Connect(function(player)
local Be = player.playerStats.berryID
while true do
wait(1)
print(Be.Value)
end
end)`

1 comment
Thank you very much for the answer, I appreciate it a lot!!