#Why This Damage Script Isn't Working?

48 messages · Page 1 of 1 (latest)

violet aspen
#

my script

#
        hitbox.Touched:Connect(function(hit)
            if hit.Parent:FindFirstChild("Humanoid") then
                if hit.Parent.Name ~= player.Name then
                    if not hit.Parent:FindFirstChild("DivineDogCooldown") then
                        local cd = Instance.new("IntValue",hit.Parent)
                        cd.Name = "DivineDogCooldown"
                        local sound2 = game.ReplicatedStorage.Infinity.Red2:Clone()
                        sound2.Parent = hit.Parent.HumanoidRootPart
                        sound2:Play()
                        game.Debris:AddItem(sound2,1)
                        if player:FindFirstChild("UsingDomainExpansion") then
                            hit.Parent.Humanoid:TakeDamage((10 * (value.Value / 4)) * 2)
                        else
                            hit.Parent.Humanoid:TakeDamage(10 * (value.Value / 4))
                            print(2)
                        end
                        game.Debris:AddItem(cd,.75)
                    end
                end
            end
        end)
real lotus
#

thats more than just damage lol

#

what is value?

#

If its 0, then damage is 0, meaning it wont do anything

violet aspen
real lotus
#

could you show the full script

violet aspen
#

the text1 to text4 i will not use rn

#

bruh

real lotus
#

delete this and make your own post bro

violet aspen
real lotus
#

wait one sec I'll do it for you

violet aspen
still haven
#

oh mb XD

#

i didnt know u need to make new post for that mb again

still haven
violet aspen
still haven
#

thx

violet aspen
still haven
real lotus
#

Try that

#

If it doesnt work, tell me if it errors

still haven
real lotus
#

If you want to get warned for misuse of channels, you could do it in here

#

if not, dms

still haven
#

ok XD

violet aspen
#

i tested here and hitbox dont detect touch (i tested it with print)

real lotus
#

to be honest

#

rewrite that whole thing, its very messy

violet aspen
violet aspen
#

ok

#

worked ig

real lotus
#

aight

violet aspen
#

i think it's take damage

#

the problem

real lotus
#

no

#

TakeDamage()

#

should work

violet aspen