I’m using a local script and a module script so that I can make a move set for the player. The issue is, nothing is being outputted in the output, and so I’m not sure what I’m supposed to do because there’s no errors.
Local Script
local player = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local Input = game:GetService("UserInputService")
local moveModule = require(game:GetService("ReplicatedStorage"):WaitForChild("Player"):WaitForChild("Moveset"))
local char = game.Players.LocalPlayer.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
local CAS = game:GetService("ContextActionService")
local state = nil
local moves = moveModule.moves
CAS:BindAction("Crouch", moves, false, Enum.KeyCode.LeftControl) -- Crouch
CAS:BindAction("Dive", moves, false, Enum.KeyCode.E) -- Dive
CAS:BindAction("LJ", moves, false, Enum.KeyCode.LeftShift and Enum.KeyCode.Space) -- Long Jump
CAS:BindAction("GP", moves, false, Enum.KeyCode.LeftShift and Enum.KeyCode.Space) -- Ground Pound
Module Script
local module = {}
module.LJCoolDown = false
module.CCooldown = false
module.DCooldown = false
module.GPCooldown = false
local state = ""
function module.moves(action, inputState, inputObject)
if action == "LJ" then
if inputState == Enum.UserInputState.Begin and not module.LJCoolDown then
module.LJCoolDown = true print("Long Jump Activated")
task.wait(2)
module.LJCoolDown = false
else return end elseif action == "Crouch" then
if inputState == Enum.UserInputState.Begin and not module.CCooldown then
module.CCooldown = true print("Crouch Activated")
task.wait(1)
module.CCooldown = false
else return end elseif action == "Dive" then
if inputState == Enum.UserInputState.Begin and not module.DCooldown then
module.DCooldown = true print("Dive Activated")
task.wait(1)
module.DCooldown = false
else return end elseif action == "GP" then
if inputState == Enum.UserInputState.Begin and not module.GPCooldown and state ~= "Freefalling" then
module.GPCooldown = true print("Ground Pound Activated")
task.wait(1)
end
end
end
return module