local Tool = script.Parent
local plr = game.Players.LocalPlayer
local SickValue = plr.PlayerGui.Sick.Value
Tool.Activated:Connect(function()
if SickValue == true then
SickValue = false
elseif SickValue == false then return end
end)
Tool.Unequipped:Connect(function()
SickValue = false
end)
Hi everyone! This is a localscript in a tool in which, upon equipping it, it would edit and turn a “Sick” value to false, which I have put in my PlayerGUI.
Hello, this looks like an issue with the “Value”, try using this code and let me know:
local Tool = script.Parent
local plr = game.Players.LocalPlayer
local SickValue = plr.PlayerGui:WaitForChild("Sick")
Tool.Activated:Connect(function()
if SickValue.Value == true then
SickValue.Value = false
elseif SickValue.Value == false then return end
end)
Tool.Unequipped:Connect(function()
SickValue.Value = false
end)
If you using a tool with no Handle or parts, make sure RequiresHandle value is on false.