I need 2 scripts. One to save the boolean when someone leaves, and one to load the boolean when they join. The boolean is in a textbutton in a screengui in the startergui. Script for when someone joins
game.Players.PlayerAdded:connect(function(p) -- Try. try.
local bought = Player.playergui.Inventory.Inventory.Frame.Item.HasBought.Value
if p:WaitForDataReady() then
local loaded = p:SaveBoolean(bought)
bought = loaded
print("Loaded")
end
end)
Any halp ples

2 comments
Well one issue I see, is "Player" is referenced when it does not exist. "p" is the reference for a player. Consider changing that.
Also: You do not need 2 seperate scripts, you only need 2 functions on the same script