#datastore

44 messages · Page 1 of 1 (latest)

stoic flint
#

Like write a datastore script entirely for you?

surreal nimbus
#

leaderstats is a good place to STORE data ?

graceful stump
surreal nimbus
#

ye but datastore saves an already existing data which is located somewhere

sacred pollen
surreal nimbus
sacred pollen
#

yes they can

#

why couldnt we

surreal nimbus
#

my bad, I mean exploiters

sacred pollen
#

oh nono

surreal nimbus
#

Is player service accessible by the client side

surreal nimbus
sacred pollen
#

today it's even more complicated since roblox did a collab with synapse x exploit

sacred pollen
#

exploiting became really complicated

surreal nimbus
#

It's a nice thing for devs

sacred pollen
#

indeed

surreal nimbus
#

I used to script there is 3-4 years

#

It was really easy

graceful stump
surreal nimbus
#

like a teamplate ?

graceful stump
#

Teamplate?

surreal nimbus
#

I saw some devs using profile service library for datastoring. They used several scripts to manage theirs datas, like a teamplate, a manager and a state module script. I'm trying to figure out how it all works together but it's tricky.

graceful stump
#

It’s really dependent on the kind of game you’re making

#

e.g. a tycoon can easily get away with a single module handling data. But some larger ones try to split their data up into different types of data

willow rampart
unreal sedgeBOT
#

studio** You are now Level 3! **studio

willow rampart
#

so that when you step on a checkpoint

#

itll save

#

and when you rejoin you go back to that checkpoint

#

but what i currently have isnt working

surreal nimbus
graceful stump
#

I would just use a module yeag

willow rampart
#

btw @stoic flint i have the script written down, just that somethings not workign i just need help

willow rampart
#

im going to bed in a sec, ill send the script tho

#

should i add you collab to the game?

stoic flint
#

Nope, I don't want any collabs atm

willow rampart
#

here :
local DataStoreService = game:GetService("DataStoreService")

local DataStore = DataStoreService:GetDataStore("ObbyDataStore")

game.Players.PlayerAdded:Connect(function(player)
local data

local success, errorMessage = pcall(function()
    data = DataStore:GetAsync(player.UserId.."-stage")
end)

if success then
    print("Success")
    if data then
        print("Test1")
        player.Team = game.Teams[data]
    else
        print("Test2")
        player.Team = game.Teams.Stage1
    end
else
    print(errorMessage)
    player.Team = game.Teams.Stage1
end

player:LoadCharacterWithHumanoidDefaults()

end)

game.Players.PlayerRemoving:Connect(function(player)
local teamName = player.Team.Name

local success, errorMessage = pcall(function()
    DataStore:SetAsync(player.UserId.."-stage", teamName)
end)

if success then
    print("All went well")
else
    print(errorMessage)
end

end)

willow rampart
#

but ok

stoic flint
#

I'll do this when I come home back from school

#

For now I'm hoping somebody would take my place

willow rampart
#

im gonna be home in 18 hours