I checked the last script you sent already and it does work, so you need to make sure that there is no errors in output (If you don’t have output you need to turn it on in View
> Output
). Also make sure that it is a Script
and not LocalScript
. You can create a new place and create a new script with the last code you sent and you will see that it works.
I know its my friend putting everything in folders so it works so thanks
run context is legacy or sever right?
Its good to always leave it on default which is Legacy
.
I noticed if I change the values with a local script it wont save
Any changes done on client wont replicate to the server. You have to change that stuff on server if you want to save them. You can use RemoteEvent
to send changes to the server:
--first create a RemoteEvent inside of ReplicatedStorage
--local script
local event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent")
local changedsettings = {
audiovolume = 20 --lets say you only want to change audiovolume (you can add more settings)
}
event:FireServer(changedsettings)
--server script
local event = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent")
event.OnServerEvent:Connect(function(player,changedsettings)
if changedsettings then
for i,v in pairs(changedsettings) do
if player.SETTING_DATA:FindFirstChild(i) then
player.SETTING_DATA[i].Value = v
end
end
end
end)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.