#it wont save

1 messages · Page 1 of 1 (latest)

gusty hatch
#

local players = game:GetService("Players")
local Replicatedstorage = game:GetService("ReplicatedStorage")
local dataManager = require(script.Parent:WaitForChild("Module"):WaitForChild("dataManager"))
local ChangeCharacter = Replicatedstorage:WaitForChild("remortes"):WaitForChild("changeCharacter")
local characterModule = require(Replicatedstorage:WaitForChild("Module"):WaitForChild("CharactersModule"))

players.PlayerAdded:Connect(function(player)
local character = characterModule.GetCharacter(player)
print(character)
end)

ChangeCharacter.OnServerEvent:connect(function(player, character)
if player and character then
local profile = dataManager.Profiles[player]

    if Replicatedstorage:WaitForChild("Module"):WaitForChild("CharactersModule"):WaitForChild("characters"):FindFirstChild(character) then
        profile.Data.SelectedCharacter = character
        player:waitForChild("SelectedCharacter").Value = profile.Data.SelectedCharacter
    end
end

end)

fading lynx
#

@gusty hatch

gusty hatch
fading lynx
supple loom
#

Just use playerstore and a controller for it I recommend 2 module scripts but 1 also can work

supple loom
#

or playerservice