I'm trying to make it so the user has to hold the key down 3 seconds but i end up breaking the script everytime i try to
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Replicated = script.Parent
local event = Replicated:WaitForChild("Use")
local deactivate = Replicated:WaitForChild("Not")
local using = false
local cooldown = false
mouse = Player:GetMouse()
holding = false
mouse.KeyDown:connect(function(key)
if key == 'm' then
if holding == false then
holding = true
event:FireServer()
else
holding = false
deactivate:FireServer()
end
end
end)
