You can write your topic however you want, but you need to answer these questions:
What do you want to achieve?
I want to have this modulescript work again once the ability is finished
What is the issue?
Once the ability is finished, it sets the “hasAbility” bool to false yet it doesn’t give the ability again
What solutions have you tried so far?
I’ve tried moving code, tried changing times, clueless on what it could be.
The issue is the same for all orbs so I’m going to send it just for one orb.
if hasAbility.Value == false then
local function countdown()
for i = abilityTime, 0, -1 do
abilityTime = i
timer.Text = i
if orbName == "RedOrb" then
hasAbility.Value = true
doubleJumpGradient.Parent = bar
title.Text = "DOUBLE JUMP"
doubleJumpIcon.Visible = true
infoBG:TweenPosition(UDim2.new(0.007, 0,0.297, 0), "Out", "Linear", 0.4)
title.Text = ""
doubleJumpIcon.Visible = false
infoBG:TweenPosition(UDim2.new(-1,0,.297,0), "Out", "Linear", 0.4)
hasAbility.Value = false
runGui.Visible = true
holder.Visible = false
infoBG.Visible = false
Script inside orb:
if db == false then
if game:GetService("Players"):FindFirstChild(hit.Parent.Name) then
player = game:GetService("Players"):WaitForChild(hit.Parent.Name)
module:DoAbility(orb, player, abilityTime)
db = true
I’m clueless on why the script won’t repeat once the orb has been touched, please help.
Also, should I use TweenService instead of this method?
No, because we don’t need the orb anymore as we’re just changing some gui things and a a couple variables and it works once but if i try it for another orb after the ability is finished, it no longer works. it used to work in the future. It broke ever since I added the gradient.
We destroy the orb before we can even set debounce to true anyway, I don’t want it firing multiple times. That’s why I have the debounce. Orbs are also cloned so the DB is there just for the specific orb which will be destroyed.