Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is it ok if this datastore script doesn't work in studio but does in the actual game?

Asked by 6 years ago

I've enabled API access to roblox studio btw, I am very confused how this is not working on studio but works on the actual game, might be cause I am changing the values through the explorer and properties tab and not through like some sort of script when I am in studio and when I am in the actual game I pull out the dev console and type command to give myself money that way..

01local DS = game:GetService("DataStoreService")
02local myDS = DS:GetDataStore("FlexingSimulatorDataStor")
03 
04local startingFlexCoins = 15
05 
06game.Players.PlayerAdded:Connect(function(plr)
07    local leader = Instance.new("Folder",plr)
08    leader.Name = "leaderstats"
09 
10    local stats = Instance.new("Configuration",plr)
11    stats.Name = "Stats"
12 
13    local flexCoins = Instance.new("IntValue",leader)
14    flexCoins.Name = "FlexCoins"
15 
View all 40 lines...
0
Yea, that's fine, because when you change the values on the explorer tab, you're changing them from the client, unless you switch your view to the server view while playing. User#22980 0 — 6y
0
I heard server stuff used to never work in the studio, so if you are running it as the client, it won't look like it's working. SteamG00B 1633 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

This is pretty normal, and sometimes it will randomly save (lol), if you need coins for testing then put in a script temporarily that searches for Player1 and give them coins

Ad

Answer this question