How do you save colors and load them?
Recently, i tried using DataStore for saving my morphs, and since they mostly rely on colour, the player morphs into the model as it loads the colors onto the morph.
This is what i did.:
01 | local DataStore = game:GetService( "DataStoreService" ):GetDataStore( "NicuWolfSlot1" ) |
02 | local player = script.Parent.Parent |
05 | local Colors = { "Institutional white" , "Really black" , "Reddish brown" , "Dark stone grey" , "Dark orange" , "Black" , |
06 | "Brick yellow" , "Nougat" , "Cool yellow" , "Bright yellow" , "Pastel yellow" , |
07 | "Medium stone grey" , "Mid gray" |
11 | player.Chest.Body.BrickColor, |
12 | player.Chest.Chest.BrickColor, |
13 | player.Chest.Neck.BrickColor, |
14 | player.Chest.Tail 1. BrickColor, |
17 | local colorstore = colorstosave( "Colors" ) |
19 | game.Players.PlayerRemoving:connect( function () |
20 | local viewkey = "player-" ..player.PlayerID |
21 | local Savedstuff = DataStore:GetAsync(viewkey) |
25 | for i = 1 , #colorstosave do |
26 | colorstore = Savedstuff [ 1 ] |