What im trying to do: make player freeze and unfreeze after a certain amount of time after pressing E
script:
local PlayerMod = require (game:GetService(“Players”).LocalPlayer.PlayerScripts:WaitForChild(“PlayerModule”))
local Controls = PlayerMod:GetControls()
local uis = game:GetService(“UserInputService”)
local db = false
uis.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.KeyCode.E and not db then
db = true
Controls:Disable()
wait(5)
db = false
Controls:Enable()
end
end)
any help is appreciated :DD