So, currently I want to make the attempt once I press on a certain tool, it’ll fire the toolname to the serverscript, and that server script will call upon a certain module script, but this is where I get stumped.
currently I have the local script like this
local Toolie = script.Parent
Toolie.Activated:Connect(function()
if Debounce == true then return end
if Debounce == false then
Debounce = true
RS.CombatEvents.SkillSystem:FireServer(script.Parent.Name)
task.wait(9)
Debounce = false
end
end)
Then within my actual skill server, I have a MainModule which is meant to be doing this,
function MainModule:CheckMove(Tool, ToolName, FuncName)
if ToolName == Tool then
print("lol.")
return ToolName, true
end
end
so then after that, I want to see if the Tool name is true to the ToolName/The Skill name, and fire that specific module within the server script, but it isn’t working in my favor, and I don’t know to set a module to a specific name like this
["SpinKick"] = function(par, par, par)
--Skillandvariousotherscriptsplacedinhere
end
So instead I had to specific just fire out that module script, but that’s not really the way I wanted it to work.
if Tool == "SpinKick" then
DMG = 15
end
local Character = Player.Character
local Hum = Character.Humanoid
local animtracks = Player.Character.Humanoid:GetPlayingAnimationTracks()
local Action, Length = SkM.getAnimation(Player.Character.Humanoid, 3)
for _,v in pairs(animtracks) do
v:Stop()
end
Action:Play()
Action:GetMarkerReachedSignal("SpinKickHitbox"):Connect(function()
print("Smooth sailing")
local ToolName, EqualToolName = MM:CheckMove(Tool, Tool, FuncName)
print("Alr so what happened")
if EqualToolName == true then
print("YUHH")
if ToolName == Tool then
MM:AddSound(Player.Character.HumanoidRootPart, "BrutalHit", 1, false)
print(ToolName, Tool)
SkM.SpinKick(Player, Player.Character, DMG, Tool)
print("Uhm?")
end
end
end)