I was using the sword tool, but when I use an auto clicker in the safe zone, the equip action glitches and says ‘Danger Zone’. I need a fix for this touch issue.
Video in
What is part
inside script
wait(2)
script.Parent.Touched:Connect(function(part)
local character = part.Parent
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
local player = game.Players:GetPlayerFromCharacter(character)
if player then
local safe = player:FindFirstChild("Safe")
if safe then
safe.Value = true
end
end
end
end)
script.Parent.TouchEnded:Connect(function(part)
local character = part.Parent
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
local player = game.Players:GetPlayerFromCharacter(character)
if player then
local safe = player:FindFirstChild("Safe")
if safe then
safe.Value = false
end
end
end
end)
i hope anyone helping!