In my game, I'm making the players have customizable houses. I have the saving system down, but I just realized that the way that I did it is wrong.
while true do
wait()
local name = script.Parent.Parent.Name
local namepttwo = string.sub(name,1, 5)
if namepttwo == "House" and script.Parent.ItemNumber.Value ~= "None" and script.Parent.ItemNumberPos.Value ~= "None" then
local Player = game.Players[script.Parent.FurOwner.Value]
local posrecord = tostring(script.Parent.PrimaryPart.Position)
Player[script.Parent.ItemNumberPos.Value].Value = ""..posrecord..""
end
end
This script has the furniture item in the house constantly telegraph its position to a value in the player, which gets saved by DataStore.
The problem is that what if the player gets a different house(which would be in a different location) the next time the player decides to play the game? The furniture's location would be in the old house still! Is there anyway I can fix this so that it could save and load to any house?
