so when the projectile hit’s something it creates a ball that increases size for a little bit but the ball isnt spawning where the projectile hits https://gyazo.com/a2e8f1bd796990d7da75715f6bcbb7c0
when i lower the body velocity on the projectile it doesn’t spawn as far and the other way around
Got the code for the creation of the ball? Plus how are you ensuring the projectile hit’s position are you using ray casting or .Touched?
local shootAnim = 1
script.Parent.shootevent.OnServerEvent:Connect(function(player,mouseHit,spawnPos)
local char = player.Character
local hum = char:FindFirstChild("Humanoid")
local anim = nil
if shootAnim == 1 then
shootAnim = 2
anim = hum:LoadAnimation(script.Animation)
else
shootAnim = 1
anim = hum:LoadAnimation(script.Animation2)
end
anim:Play()
wait(.3)
local projectile = script.projectile:Clone()
projectile.Parent = char
projectile.Anchored = false
projectile.Transparency = 0
projectile.Fire.Enabled = true
projectile.Trail.Enabled = true
projectile.Position = spawnPos.Position
local bv = Instance.new("BodyVelocity",projectile)
bv.Velocity = CFrame.new(spawnPos.Position,mouseHit.Position).LookVector*1
wait()
bv.Velocity = CFrame.new(spawnPos.Position,mouseHit.Position).LookVector*100
game.Debris:AddItem(projectile,3)
wait(.2)
projectile.Touched:Connect(function(hit)
local effectp1 = script.effect:Clone()
local effectp2 = script.effect2:Clone()
game.Debris:AddItem(effectp1,10)
game.Debris:AddItem(effectp2,10)
effectp1.Parent = game.Workspace
effectp2.Parent = game.Workspace
effectp1.CFrame = projectile.CFrame
effectp2.CFrame = projectile.CFrame
projectile:Destroy()
local canDamage = true
effectp2.Touched:Connect(function(hit)
local ehum = hit.Parent:FindFirstChild("Humanoid")
if ehum and canDamage then
canDamage = false
ehum:TakeDamage(player.playerVars.playerLevel.Value*3)
ehum:TakeDamage(6.5)
wait(.125)
canDamage = true
end
end)
local bruh = 4
repeat wait(.025)
effectp1.Size = effectp1.Size + Vector3.new(.25,.25,.25)
effectp2.Size = effectp2.Size + Vector3.new(.25,.25,.25)
bruh = bruh - 1
until bruh == 0
wait(.2)
effectp1:Destroy()
effectp2:Destroy()
end)
end)
also i am using .touched
BananaThief28:
also i am using .touched
Ah that may be the issue, .Touched has a bad notoriety of being unreliable and exploitable. You can either use a custom .Touched event or the popular FastCast community resource which is continually getting updates.
The issue is that the client has to be the one firing the Touched events for the server to see them. If the client does not know the server wants touch events, or if some exploit on the client forces it not to send touch events, the server will not detect touches* by the player’s character or any client-owned parts.
*reliably.
I believe OP is asking for a way to detect touched events when the client isn’t sending them. As far as I know, that’s not possible, but what you can do is use a little T…
Hey everybody!
Click to view key information for existing users The module’s version is currently Ver 13.2.0 released on 12 November 2020** Changelogs can be viewed <a href="https://etithespirit.github.io/FastCastAPIDocs/changelog/">HERE</a>
Support will only be given for the current version. Certain public toolkits that include FastCast may be using an out of date version. Please check the version in the main module (a comment near the top) before asking for help.
In thi…
1 Like
ill check that out but i got it working fine by stopping the projectile when it hits and then making it wait for little bit and then spawning it thanks anyways
1 Like