How Do I Change A StringValue To Something The Player Puts?

Hello Devs! I Am Making A Sort Of Game Inspired By Kinito Pet And The Player Gets Asked Some Questions And I Need The Questions To Be Saved (To The Server Ofcourse) So I Can Use Them Later.

I Dont Really Know How To Do This So I Would Be Glad To Get Some Help!


The Question Box:
image


The Values Are In ReplicatedStorage Named :
image


I Dont Really Have Anymore Stuff To Say So Ask Some Questions If Needed.

Use datastores to save the data using the player user id as the key, there’re plenty of resources online. I suggest you use a reputable datastore module instead of directly calling Roblox APIs if you want to use this in production. Also here’s a function for converting your instances to a dictionary that can be saved in a datastore:

local function valuesToDict(valuesFolder: Instance): {}
	local values = {}
	for _, value in pairs(valuesFolder:GetChildren()) do
		if not value:IsA("ValueBase") then continue end
		values[value.Name] = value.Value
	end
	return values
end

You also need to use remote events to send the data of the client-sided UI to the server. Make sure to make checks so the client doesn’t give the server values they aren’t supposed to.

It’s also worth noting that directly changing the replicated storage values isn’t a good idea, if you do it on the client it won’t replicate to the server(so you can’t save it), and if you do it on the server it will replicate to all the clients(not only the one that has this specific data). Replicated storage values are more useful for things such as shared modules between client and server and for sending data to all the clients at once.

Like i think this would work but i think i’m too dumb to understand this. i might just scrap the answered questions saving ;-;