if workspace.Configuration.ChangeTheme.Value == script.Parent.Name then
script.Parent.Visible = true
else
script.Parent.Visible = false
end
workspace.Configuration.ChangeTheme.Changed:Connect(function()
if workspace.Configuration.ChangeTheme.Value == script.Parent.Name then
script.Parent.Visible = true
else script.Parent.Visible = false
end
end)
This script is for changing the theme of a frame known as a scoreboard. The script before would work as a serverscript but now it doesn’t unless I put it in a local script were only the client sees the changed theme.
local objectToToggle = game.Workspace.YourObjectNameHere -- name of the object you want to toggle
game.Workspace.Configuration.ChangeTheme.Changed:Connect(function()
local desiredTheme = objectToToggle.Name -- desired theme
if game.Workspace.Configuration.ChangeTheme.Value == desiredTheme then
objectToToggle.Visible = true
else
objectToToggle.Visible = false
end
end)