One of my events isn’t firing, even though it prints “got here”
the dogui stuff is just a cooldown thing, and it works fine. The first event does the effects and stuff, and the 2nd event removes the effects.
if input.KeyCode == Enum.KeyCode.E and YoruDebounce == false then
YoruDebounce = true
event:FireServer("Yoru")
cdmodule.DoGui(player, Color3.new(1, 1, 1),7, "Dimensional Drift (Timer)")
print("got here")
event:FireServer("End")
cdmodule.DoGui(player, Color3.new(0, 0, 1),16, "Dimensional Drift")
YoruDebounce = false
end
2 Likes
TheDCraft
(TheDCraft)
June 19, 2022, 9:08pm
#2
How does this look on the server, it may be an issue there?
1 Like
event2.OnServerEvent:Connect(function()
return end)
local animfolder = game.ReplicatedStorage:FindFirstChild("Animations"):FindFirstChild("ModSpec"):FindFirstChild("Yoru")
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")
if character:FindFirstChild("isAttacking").Value == true then return end
if skill == "Yoru" then
print(player.Name, "Starting Yoru!")
local anim1 = animfolder.Start
local anim2 = animfolder.Run
local anim3 = animfolder.Exist
---------------------
local sound = script.Start:Clone()
sound.Parent = character
sound:Play()
---
game:GetService("Chat"):Chat(player.Character.Head, "I'll Handle This.")
---
task.delay(2, function()
sound:Destroy()
end)
local loader1 = character:FindFirstChild("Humanoid"):LoadAnimation(anim1)
loader1:Play()
task.wait(0.8)
character.isAttacking.Value = true
----
character:FindFirstChild("SuperArmor").Value = true
local yorufx = game.ReplicatedStorage:FindFirstChild("YoruVisuals"):Clone()
yorufx.Parent = character
---------------
character:FindFirstChild("Humanoid").WalkSpeed = 30
-------------
task.spawn(function()
character:FindFirstChild("Head"):FindFirstChild("EyeOne").BillboardGui.Enabled = true
character:FindFirstChild("Head"):FindFirstChild("EyeOne").Fire.Enabled = true
-----------------------------------------
character:FindFirstChild("Head"):FindFirstChild("EyeTwo").BillboardGui.Enabled = true
character:FindFirstChild("Head"):FindFirstChild("EyeTwo").Fire.Enabled = true
end)
----------------
task.wait()
local loader2 = character:FindFirstChild("Humanoid"):LoadAnimation(anim2)
loader2:Play()
----------
local sound2 = script.In:Clone()
sound2.Parent = character
sound2:Play()
--------------
end
if skill == "End" then
print(player.Name, "Ending Yoru!")
task.spawn(function()
character:FindFirstChild("Head"):FindFirstChild("EyeOne"):FindFirstChild("BillboardGui").Enabled = false
character:FindFirstChild("Head"):FindFirstChild("EyeOne").Fire.Enabled = false
-----------------------------------------
character:FindFirstChild("Head"):FindFirstChild("EyeTwo").BillboardGui.Enabled = false
character:FindFirstChild("Head"):FindFirstChild("EyeTwo").Fire.Enabled = false
end)
--------
character:FindFirstChild("Humanoid").WalkSpeed = 16
--------------
character.isAttacking.Value = false
--------------
local sound3 = script.Exit:Clone()
sound3.Parent = character
sound3:Play()
----------
character:WaitForChild("YoruVisuals"):Destroy()
------------
task.delay(sound3, 2, function()
sound3:Destroy()
end)
---
character:WaitForChild("In"):Destroy()
-----
for i,v in pairs(humanoid:GetPlayingAnimationTracks()) do
if v.Name == "Run" then
v:Stop()
end
end
local loader3 = character:FindFirstChild("Humanoid"):LoadAnimation(animfolder.Exist)
----
loader3:Play()
end
```end)
1 Like
TheDCraft
(TheDCraft)
June 19, 2022, 9:10pm
#4
Its not even in the remote event? Or is that an error when pasting the code
1 Like
It is, just an error when pasting the code.
1 Like
TheDCraft
(TheDCraft)
June 19, 2022, 9:12pm
#6
Well, in this case, the best thing to do is add a print after each line and see how far it gets. I would start with the first few lines
1 Like
It prints anything that isn’t in the “End” if statement.
TheDCraft
(TheDCraft)
June 19, 2022, 9:19pm
#8
So the event does fire, if so maybe use elseif
instead of another if statement.
1 Like
well yeah, the first event does fire.
TheDCraft
(TheDCraft)
June 19, 2022, 9:34pm
#10
What about the second one? Since you said it reads everything but the kill?
1 Like
Should be event2.onserverevent:Connect(function(player)
that’s for something completely different
2 Likes
so when the timer runs out, the event fires “End” and is supposed to remove the fx but it doesn’t.
TheDCraft
(TheDCraft)
June 19, 2022, 9:41pm
#14
Can you send the script without the errors of pasting? It’s kind of hard to tell since we don’t know what your sending over.
``local Debris = game:GetService(“Debris”)
local event = game.ReplicatedStorage.Events.Other.ModSpec
local stunmodule = require(game.ReplicatedStorage:FindFirstChild(“Modules”):FindFirstChild(“Stun”))
local event2 = game.ReplicatedStorage.Events.CombatEvents.Damage
event.OnServerEvent:Connect(function(player, skill)
event2.OnServerEvent:Connect(function()
return end)
local animfolder = game.ReplicatedStorage:FindFirstChild("Animations"):FindFirstChild("ModSpec"):FindFirstChild("Yoru")
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")
if character:FindFirstChild("isAttacking").Value == true then return end
if skill == "Yoru" then
print(player.Name, "Starting Yoru!")
local anim1 = animfolder.Start
local anim2 = animfolder.Run
local anim3 = animfolder.Exist
---------------------
local sound = script.Start:Clone()
sound.Parent = character
sound:Play()
---
game:GetService("Chat"):Chat(player.Character.Head, "I'll Handle This.")
---
task.delay(2, function()
sound:Destroy()
end)
local loader1 = character:FindFirstChild("Humanoid"):LoadAnimation(anim1)
loader1:Play()
task.wait(0.8)
character.isAttacking.Value = true
----
character:FindFirstChild("SuperArmor").Value = true
local yorufx = game.ReplicatedStorage:FindFirstChild("YoruVisuals"):Clone()
yorufx.Parent = character
---------------
character:FindFirstChild("Humanoid").WalkSpeed = 30
-------------
task.spawn(function()
character:FindFirstChild("Head"):FindFirstChild("EyeOne").BillboardGui.Enabled = true
character:FindFirstChild("Head"):FindFirstChild("EyeOne").Fire.Enabled = true
-----------------------------------------
character:FindFirstChild("Head"):FindFirstChild("EyeTwo").BillboardGui.Enabled = true
character:FindFirstChild("Head"):FindFirstChild("EyeTwo").Fire.Enabled = true
end)
----------------
task.wait()
local loader2 = character:FindFirstChild("Humanoid"):LoadAnimation(anim2)
loader2:Play()
----------
local sound2 = script.In:Clone()
sound2.Parent = character
sound2:Play()
--------------
end
print(1)
if skill == "End" then
print(player.Name, "Ending Yoru!")
task.spawn(function()
character:FindFirstChild("Head"):FindFirstChild("EyeOne"):FindFirstChild("BillboardGui").Enabled = false
character:FindFirstChild("Head"):FindFirstChild("EyeOne").Fire.Enabled = false
-----------------------------------------
character:FindFirstChild("Head"):FindFirstChild("EyeTwo").BillboardGui.Enabled = false
character:FindFirstChild("Head"):FindFirstChild("EyeTwo").Fire.Enabled = false
end)
--------
character:FindFirstChild("Humanoid").WalkSpeed = 16
--------------
character.isAttacking.Value = false
--------------
local sound3 = script.Exit:Clone()
sound3.Parent = character
sound3:Play()
----------
character:WaitForChild("YoruVisuals"):Destroy()
------------
task.delay(sound3, 2, function()
sound3:Destroy()
end)
---
character:WaitForChild("In"):Destroy()
-----
for i,v in pairs(humanoid:GetPlayingAnimationTracks()) do
if v.Name == "Run" then
v:Stop()
end
end
local loader3 = character:FindFirstChild("Humanoid"):LoadAnimation(animfolder.Exist)
----
loader3:Play()
end
end)
1 Like
TheDCraft
(TheDCraft)
June 19, 2022, 9:53pm
#16
I would say move event2 out since there’s not really any point having it there, I would just move it outside the remote, since after the event remote runs its going to connection event2 and it never gets disconnected. Also use elseif
if Skill == "Yoru" then
elseif Skill == "End" then
end
Also if possible could you show the output of the game?
TheDCraft
(TheDCraft)
June 19, 2022, 9:58pm
#18
Also did you make the changes I suggested?
Yes, I did exactly what you told me.
1 Like
TheDCraft
(TheDCraft)
June 19, 2022, 10:00pm
#20
Just to get this right the second event doesn’t fire at all, or it does but not the kill part?