Hello,
I have a script that changes BoolValues, would this script cause my games frames to drop?
Script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local settingsFolder = ReplicatedStorage:WaitForChild("Settings")
local clientHighlightEnabled = settingsFolder:WaitForChild("ClientHighlightEnabled")
local function playSound()
script.Parent.Parent.Parent.Click:Play()
end
local function updateClientHighlight()
if clientHighlightEnabled.Value == true then
script.Parent.Text = "Highlight Player: ON"
else
script.Parent.Text = "Highlight Player: OFF"
end
end
local function toggleClientHighlight()
clientHighlightEnabled.Value = not clientHighlightEnabled.Value
updateClientHighlight()
end
script.Parent.MouseButton1Click:Connect(function()
playSound()
toggleClientHighlight()
end)
clientHighlightEnabled.Changed:Connect(updateClientHighlight)
script.Parent.MouseEnter:Connect(function()
script.Parent.BackgroundColor3 = Color3.new(1, 1, 0.498039)
end)
script.Parent.MouseLeave:Connect(function()
script.Parent.BackgroundColor3 = Color3.new(0, 0, 0)
end)
I have 5 other local scripts that use this same format.