#ability only working in test
1 messages · Page 1 of 1 (latest)
** You are now Level 2! **
you need to put it in a server script
if ur still having problems make sure to post the code
i have
i have a local and server
@glacial python then send the code like i said
you can send it as a.txt
no one will help you if you send it as an image
it just burns my eyes a bit
** You are now Level 4! **
it ok
instead of sending the code you can just download the project and upload either works
how
click file
then download a copy
also i think i found ur problem
you have both client and server code in the same file
waiot what
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
lemme know if it works
sadly not
done everything and it still dont work bruh
heres the new file
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
that it
** You are now Level 3! **
?
** You are now Level 5! **
how do u activate the attack
click
ok
ohhh im dumb i forgot to select my character
what is flash supposed todo do?
damage someone in a radius
infornt of them
like this
@delicate pagoda updates?
still working on
thats cool
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
did u test it
so i imported the scripts into the actual thing
but it just doesnt do anything
Infinite yield possible on 'Players.Ramissm.PlayerScripts:WaitForChild("ActivateFlash")'