Trying to achieve a settings gui that turns parts in a folder in ReplicatedFirst invisible or visible (for the client only) depending on what you set.
However, pressing the gui button i have set up works perfectly fine for gui elements, but does absolutely nothing for the parts in a folder.
the Script is a localscript inside of a screengui , and the button’s function goes like this:
function updatesettings(thing,trufal)
if thing == "example1" and trufal == false then
page1.func_toggle_example1.actived.Value = false
game.ReplicatedFirst.Folder.Example1.Transparency = 1
end
if thing == "example1" and trufal == true then
page1.func_toggle_example1.actived.Value = true
game.ReplicatedFirst.Folder.Example1.Transparency = 0
end
end
------------------------------------------
page1.func_toggle_blood.Activated:Connect(function()
ndow.setting_click:Play()
if page1.func_toggle_example1.actived.Value == false then
page1.func_toggle_example1.actived.Value = true
updatesettings("example1",true )
else
page1.func_toggle_example1.actived.Value = false
updatesettings("example1",false )
end
end)
the part “Example1” is then spawned in from replicatedfirst into workspace, and doesn’t keep the transparency that is set to it in replicatedfirst. localtransparencymodifier does the same. Nothing in the place file edits the part’s transparency apart from that script.
If you are changing the Transparency over client, and cloning the thing over Server ,it will stay at Transparency that was before the client updated it,
Since client can’t just update the Part, if your cloning the Part over the Client and sending it to workspace it should be fine,
not sure what exactly your doing,
To me the whole thing is working, whilst I tried replicating it.
local trufal = false
function updatesettings(thing,trufal)
game.ReplicatedFirst.Folder[thing].Transparency = not trufal and 1 or 0
end
------------------------------------------
script.Parent.ImageButton.MouseButton1Down:Connect(function()
trufal = not trufal
updatesettings('Example1',trufal)
end)
the parts are now placed into the character’s limbs, and there is a numbervalue for the localtransparencymodifier (part.localtransparencymodifier = script.parent.numbervalue.value) but i don’t know how to set that numbervalue from the localscript in the gui.