Is this correct? Cause it didn’t work. I would like to keep it in the localscript.
local last_press = tick()
if tick() - last_press < 30 then
local UIS = game:GetService(“UserInputService”)
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.F then
game.ReplicatedStorage.TimeStop:FireServer()
return
end
end)
end
(If this is wrong sorry I’m such a noob scripter)
local last_press = tick()
local UserInputService = game:GetService(“UserInputService”)
UserInputService.InputBegan:Connect(function(input, game_processed)
if game_processed or tick() - last_press < 30 then
return
end
last_press = tick()
if input.KeyCode == Enum.KeyCode.F then
game.ReplicatedStorage.TimeStop:FireServer()
end
end)