Okay. So this script is supposed to save what houses the player has bought and make it so that they are still usable by the player after the player has left the game and returned. I am not at all confident in the script being correct and I don't want to waste hours earning the money to buy the house in my game only to see that the script didn't work. Here is the script:
local plr = game.Players.LocalPlayer local washousePurchased = false local uniquekey = 'id-'..plr.UserID if script.Parent.MouseClick and plr.leaderstats.Money.Value >= 150 then --if the clickdetector that is the script's parent got clicked while the player's money value was 150 or up, the house was automatically purchased, so essentially this is just seeing if the house was bought washousePurchased = true --purchasing the house makes the value true if washousePurchased == true then game.Players.PlayerAdded:connect(function() game.Workspace["Uncommon House"].Door.CanCollide = false --makes the house's door's cancollide value false so that the person who bought it can get in end) end end --i bet i made 1000 different errors here, don't make fun of me i am a total scripting nub :P
Try this script if it isn't working.
game.Players.PlayerAdded:connect(function(plr) local washousePurchased = false local uniquekey = 'id-'..plr.UserID if script.Parent.MouseClick and plr.leaderstats.Money.Value >= 150 then washousePurchased = true if washousePurchased == true then game.Workspace["Uncommon House"].Door.CanCollide = false end end end)