I’m trying to make a skill, with a clone effect while charging the skill.
Everything works fine except this while statement, I’ve been able to track it down and the problem is the while statement. Here is my script:
uis.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed or eCoolDown then return end
if char:FindFirstChild("Sabre") then
if input.KeyCode == Enum.KeyCode.E then
InputPressing = true
print(InputPressing)
char.Humanoid.WalkSpeed = 30
char.LeftEye.TrailEffect1.Enabled = true
char.LeftEye.TrailEffect2.Enabled = true
char.LeftEye.EyeParticle.ParticleEmitter.Enabled = true
char.LeftEye.EyeParticle.ParticleEmitter2.Enabled = true
char.LeftEye.EyeParticle.ParticleEmitter3.Enabled = true
char.RightEye.TrailEffect1.Enabled = true
char.RightEye.TrailEffect2.Enabled = true
char.RightEye.EyeParticle.ParticleEmitter.Enabled = true
char.RightEye.EyeParticle.ParticleEmitter2.Enabled = true
char.RightEye.EyeParticle.ParticleEmitter3.Enabled = true
spawn(hitbox)
spawn(spawnTimeOut)
eCoolDown = true
wait(10)
eCoolDown = false
end
end
while InputPressing == true do --this is the problem i think
spawn(clone)
print("its cloning")
wait(0.2)
end
end)
Yeah I don’t know of any way to fix that, so if you could help me it would be great, I used a print statement for when the InputPressing changes it prints the boolean out, it comes out true which is meant to be. In the while statement I added a print statement to tell when the while loop starts.