#ability only working in test

1 messages · Page 1 of 1 (latest)

glacial python
#

i made this attack and it damages the player in test but in the real game ints only local

stuck coveBOT
#

studio** You are now Level 2! **studio

delicate pagoda
glacial python
#

i have a local and server

delicate pagoda
#

@glacial python then send the code like i said

glacial python
#

cant fit

#

ill post it in two parts

delicate pagoda
#

you can send it as a.txt

glacial python
delicate pagoda
glacial python
#

aight

#

hollom

shut nova
#

light mode

#

pain

glacial python
#

you can still read it tho

shut nova
#

it just burns my eyes a bit

stuck coveBOT
#

studio** You are now Level 4! **studio

glacial python
#

it ok

delicate pagoda
glacial python
#

how

delicate pagoda
#

click file

#

then download a copy

#

also i think i found ur problem

glacial python
#

what is it

delicate pagoda
glacial python
#

waiot what

shut nova
#

yeah

#

local scripts arent meant to go in serverscriptservice

delicate pagoda
#

that too

#
local tool =script.Parent
local activateRemote = tool:WaitForChild("ActivateFlash")
local responseRemote = tool:WaitForChild("FlashResponse")
local damage =10
local rayDistance = 25
local cooldownTime = 5

local cooldowns ={}

activateRemote.OnServerEvent:Connect(function(player)
    if cooldowns[player] and tick() - cooldowns[player] < cooldownTime then
        responseRemote:FireClient(player, false)
        return
    end

    cooldowns[player] = tick()
    responseRemote:FireClient(player, true)

    local char =player.Character
    if not char then return end

    local hrp = char:FindFirstChild("HumanoidRootPart")
    local humanoid = char:FindFirstChild("Humanoid")
    local handle = tool:FindFirstChild("Handle")
    local spotlight = handle and handle:FindFirstChild("SpotLight")
    local sfx = tool:FindFirstChild("Switch 2 (SFX)")

    if not (hrp and humanoid and handle and spotlight) then return end

    handle.Transparency = 0
    hrp.Anchored = true
    spotlight.Brightness = 3
    if sfx then sfx:Play() end

    local rayOrigin = hrp.Position
    local rayDirection = hrp.CFrame.LookVector * rayDistance

    local rayParams = RaycastParams.new()
    rayParams.FilterDescendantsInstances = {char}
    rayParams.FilterType = Enum.RaycastFilterType.Blacklist

    local result = workspace:Raycast(rayOrigin, rayDirection, rayParams)

    if result then
        local hitPart =result.Instance
        local hitChar =hitPart:FindFirstAncestorWhichIsA("Model")

        if hitChar and hitChar ~=char then
            local hitHumanoid = hitChar:FindFirstChild("Humanoid")
            if hitHumanoid then
                hitHumanoid:TakeDamage(damage)
                print("Hit " .. hitChar.Name .. " for " .. damage .. " damage!")
            end
        end
    end

    task.delay(1.5, function()
        if hrp then hrp.Anchored = false end
        if handle then handle.Transparency = 1 end
        if spotlight then spotlight.Brightness = 0 end
    end)
end)
#

change this script

#

to that

#

and move the local script below it

#

to starterplayerscripts

glacial python
#

thanks alot man

#

now lima test

delicate pagoda
#

lemme know if it works

glacial python
#

done everything and it still dont work bruh

#

heres the new file

delicate pagoda
#

sorry i forgot to give you the new localscript too

#

just change

the top line in ur localscript

local tool = game:GetService("ServerStorage").CharacterItems.Dipper.Flash
glacial python
#

that it

stuck coveBOT
#

studio** You are now Level 3! **studio

glacial python
#

?

delicate pagoda
#

it worked?

#

did it work?

#

@glacial python

stuck coveBOT
#

studio** You are now Level 5! **studio

glacial python
#

nah

#

same thing happene

#

i dunno whats goin on

delicate pagoda
#

how do u activate the attack

glacial python
#

click

delicate pagoda
#

ok

glacial python
#

add me and we can test

#

if u wanna

delicate pagoda
#

ohhh im dumb i forgot to select my character

glacial python
#

new version if u need

#

dw abt other abilities

#

they all have the same problem

delicate pagoda
#

what is flash supposed todo do?

glacial python
#

damage someone in a radius

#

infornt of them

#

like this

#

@delicate pagoda updates?

delicate pagoda
#

still working on

glacial python
#

thats cool

delicate pagoda
#

no animations work for me

glacial python
#

eh ill do that later

#

/just worried abt the dmg mechinic rn

delicate pagoda
#

um i tihnk it works

#

i got it to damage the thingy

#

also i was wrong on where to put the local script

#

@glacial python

#

@glacial python

glacial python
#

sorry man

#

im back

#

uh @delicate pagoda

delicate pagoda
#

did u test it

glacial python
#

so i imported the scripts into the actual thing

#

but it just doesnt do anything

#

Infinite yield possible on 'Players.Ramissm.PlayerScripts:WaitForChild("ActivateFlash")'

delicate pagoda
#

let me try the discord download

#

it seems to work for me

glacial python
#

how can i make your version my version

#

@delicate pagoda