You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? I want to make this tool change color twice each time i click it (Example, I click, the TextLabel changes to black, I click again and it returns it to Orange.)
What is the issue? It’s only turning black
What solutions have you tried so far? I’ve tried reading other articles and forums
tool.Activated:Connect(function()
local Player = game.Players:FindFirstChild(tool.Parent.Name)
local Character = Player.Character
if Character then
local Head = Character:FindFirstChild("Head")
if Head then
local OverheadGui = Head:FindFirstChild("OverheadGui")
if OverheadGui then
local TextLabel = OverheadGui:FindFirstChild("TextLabel")
if TextLabel then
OverheadGui.TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
end
end
end
end
end)
local currentClick = 1
tool.Activated:Connect(function()
local Player = game.Players:FindFirstChild(tool.Parent.Name)
local Character = Player.Character
if Character then
local Head = Character:FindFirstChild("Head")
if Head then
local OverheadGui = Head:FindFirstChild("OverheadGui")
if OverheadGui then
local TextLabel = OverheadGui:FindFirstChild("TextLabel")
if TextLabel then
if currentClick == 1 then
OverheadGui.TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
currentClick += 1
else
OverheadGui.TextLabel.TextColor3 = Color3.fromRGB(yourOrangeColor)
currentClick = 1
end
end
end
end
end
end)