hello! im having an issue with my code and im unsure what the issue is. part of the code works but the other part just…doesnt?
Heres the parts that dont work
UIS.InputBegan:Connect(function(input, chat)
if chat then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if CS.Value ~= "None" then
print("aeor")
local module = require(script.Spells)
for i, spellCast in pairs(module.SpellFunctions) do
module.SpellFunctions[string.lower(spellSaid)](CT.Value, char:FindFirstChild("Humanoid"))
print("working")
end
end
end
end)
Module Script:
module.SpellFunctions = {
incendiere = function(args1, args2)
print("aef")
if dbs.spell1 == false then
dbs.spell1 = true
if args1 == "Hands" then
args2.WalkSpeed = 0
args2.JumpHeight = 0
event:FireServer("HandFire1")
task.wait(2.5)
args2.WalkSpeed = 16
args2.JumpHeight = 7.2
end
task.wait(2)
dbs.spell1 = false
end
end,
}
The script worked before, and i recently just edited it (i used to use remote functions, but i changed it to remote events for convenience. Im unsure if that is whats causing the issue.)
Help would greatly be appreciated, thank you for your time
First, you don’t want to change things until making sure the main stuff works. Try adding a print after every event and check to see if they print (after if chat, if input.UserInputType etc)