The position of the effect seems to be the wand tip’s position…
When I print Projectile.Position == effect.Position it always says true. So I think the problem is that the projectile might be somewhere different than the client sees it or something.
if you are using raycasting for the projectile, you need to use a blacklist if you are not already. It is probably hitting the tip of the wand and therefore returns the first spot it hit? but then again it seems like your spells ray works just fine so i’m not sure.
I am not using raycasting, because I am using the .Touched event. I am using a body velocity for the projectile. Maybe that could be causing some issues?
yes that definitely is. try printing Touched.Name for the projectile and see if it returns the wand or the tip of the wand. I’m assuming that might be causing some issues
I apologize for leaving out a bit of code, but I made a check so it returns if the parent of the part is the character, any character accessory or the wand, and it does work.
It’s not working, the effect is still inaccurate, but the part that’s touched is not the tip of the wand. I even made a print statement and this is what it says:
Your problem here is that the Baseplate’s Position is in the center of the baseplate. So the projectile lands there. Do not use touched, use raycasts instead.
Here’s an example. I will not write code for you. Use this basic code and work off of it, or make your own unique solution.
function rayCastforwardWithIgnoreList(part, ignore)
local r = workspace:FindPartOnRayWithIgnoreList(Ray.new(part.Position, part.CFrame.lookVector * 3), ignore)
if r and r.Instance and r.Position then
return r.Position
end
end
function on_Update()
local lol = rayCastforwardWithIgnoreList(part, {workspace.SomePartWithItsDescendantsThatYouWantToIgnore})
if lol then
part.Position = lol
-- anchor the part
end
end