hello !
i actually using Datastore2 and i want to make a system where the player can save text, and then, this text is display in a textbox.
I try different system, but it doesnt work and i dont know why
( i past just some part of the script, not the entire one )
Players.PlayerAdded:Connect(function(player)
-- DATASTORE
local enduranceStack = DataStore2("endurance", player)
local currencyStore = DataStore2("currency", player)
local actualLevel = DataStore2("level", player)
local actualXp = DataStore2("xp", player)
local location = DataStore2("location", player)
-- LOCATION
local function updateClientLocation(lieu)
replicatedStorage.data.location:FireClient(player,lieu)
end
updateClientLocation(location:Get(defaultLocation))
replicatedStorage.data.premier.OnServerEvent:Connect(function(player)
print("HELO")
local location = DataStore2("location", player)
location:Set(lieu1)
end)
( local script )
local label = script.Parent
local replicatedStorage = game:GetService("ReplicatedStorage")
replicatedStorage.data.premier.OnClientEvent:Connect(function(lieu)
label.Text = lieu
end)