#Im trying to make an character saving system, however, it doesnt work.

1 messages · Page 1 of 1 (latest)

wary leaf
rocky swan
#

must be the wind

wary leaf
deft pulsar
#

Do you have any errors

wary leaf
#

OHH

#

the output

#

i forgot

#

@deft pulsar

rich storm
#

lets fix this

#

oh i get it

#

u have to paste this
While true do
instance.new("Part")
end

#

tell me what it prints

#

its gonna be help ful

wary leaf
#

So helpful!

rich storm
hexed tendon
#

try this instead

#

for i, x in game:GetDescendants do
Part = Instance.new("Part", workspace)
end

rich storm
hexed tendon
rich storm
#

@wary leaf try this instead
Game.Workspace.Baseplate:Destroy()

hexed tendon
#
local Characters
local Base
local Datastore = game:GetService("DataStoreService")
local DS = Datastore:GetDataStore("CharacterSave")

game.Players.PlayerAdded:Connect(function(player)
  local Name = player.Name
end)

Nvm this is a troll post

hexed tendon
#

youre obviously trollingt

#

cus if you can use datastore, theres no way you cant handle indentation and closing functions

wary leaf
#

wdym bro

#

theres barely any troll posts here

#

plu

#

plus

hexed tendon
# wary leaf

this shit is full of errors and missing indentation

wary leaf
#

its my first time using datastore

hexed tendon
#

I swear to god if youre wasting my time and i finish this script for you

#

im going to crash out

wary leaf
#

all i did

#

is ask just for help

#

not crashouts

hexed tendon
# wary leaf
local Characters
local Base
local Datastore = game:GetService("DataStoreService")
local DS = Datastore:GetDataStore("CharacterSave")

game.Players.PlayerAdded:Connect(function(player)
  local Name = player.Name
  for i, v in workspace.Bases:GetChildren() do
    if v.Owner.Value == Name then
      Characters = v.Characters
      Base = v
    end
  end
  DS:SetAsync(player.UserId, Characters)
  Base.ChildAdded:Connect(function(Char) -- this is also useless
    DS:SetAsync(player.UserId, Characters -- this is useless
  end)
end)

game.Players.PlayerRemoving:Connect(function(player)
  DS:SetAsync(player.UserId, Characters)
end)
#

if this doesnt work, then its your fault

wary leaf
#

when i close my eyes, it does.

wary leaf
#

–––––

#

–-–

#

Lol – P

thorn portal
#

u should learn datastoring

#

cuz ure script is not correct

#

of using datastore

#

u just set the data

#

but never override the data with GetAsync

#

it would be useful when you show the explorer too

#

since we dont know what "workspace.Base" is

#

bases*

#

@wary leaf

wary leaf
#

like

#

workspace.base is AN folder.

#

so when a player joins

#

and external script adds an pre-made base for the player

#

that spawns in a random position

#

so, when you buy an character.

#

it stays as an collection

#

so when you join next time, it appears on its slot.

thorn portal
#

screen shot the explorer

#

if you can

wary leaf
#

workspace

#

and the last one

#

the loadcharacter is the script to load the characters that you bought

#

ignore brain

#

its js some brian griffin model

thorn portal
#

in ur for loop

#

theres Owner

#

but ur folder is empty

#

is there another script that adds the "Owner" since u mentioned u can buy characters

wary leaf
#

the base gets cloned THEN transfered to the folder

thorn portal
#

ahh that inside replicatestorage

wary leaf
#

so it becomes their base

thorn portal
#

can u show the inside of Base

#

like expand it

wary leaf
thorn portal
#

yea so basically

#

ur issue is with the saving

#

I think ure new with datstore?

#

I can show u an video that goes 10mins for datastore

#

and it actually explains when u listen carefully

#

so ure only issue is just to understand the datastore usage

wary leaf
thorn portal
#

yea okay let me send the video

wary leaf
#

wait

#

but like

thorn portal
#

after that u might understand

wary leaf
#

i know but

#

should i just

#

use tables

thorn portal
#

no its fine

wary leaf
thorn portal
#

if u want a advanced one heres this

#

its 40 min

#

but hard to understand

thorn portal
#

never heard of that

#

im not even familiar with datastore that much

#

well if u wanna store instances

#

look it up

#

cuz I never tried to store instances before

wary leaf
#

ok

wary leaf
# thorn portal cuz I never tried to store instances before

In this tutorial, I show and explain how you can save objects to a datastore in Roblox Studio. This is not a datastore tutorial in itself, so it assumes you have at minimum, a basic understanding of datastores and how to use them. This tutorial is meant to instead explain the process of basic serialization and how it can be used by saving a set ...

▶ Play video