Hello, my script gets info about certain databases and it sends info about them into module script, which should change theirs value. The problem is, that only one Value is changed, but the second one only “saves itself into datastore”, but it doesnt change visually in Roblox Studio Explorer. The value only changes in explorer when u rejoin.
Sending values script :
local serverScript = game:GetService("ServerScriptService")
local events = serverScript.BindableEvents
local dataStore2 = require(serverScript.DataStore2)
local replicated = game:GetService("ReplicatedStorage")
local growingModule = require(replicated.Plants.Growing)
local growingTable = {}
events.Growing.Event:Connect(function(plant, player, par)
local numberFromString
local isGrowing
for i, z in pairs(par) do
numberFromString = z.Name:match("%d+")
isGrowing = dataStore2("Growing"..numberFromString, player)
table.insert(growingTable, isGrowing)
end
growingModule.Timer(growingTable, player)
end)
module script:
GrowingSystem.Timer = function(data,player)
for i, z in pairs(data) do
z:Set(123)
end
end