hey devforumers!! today i wanted to make a silly particle effect that kiind of looks like it points to the direction you’re going to (the particle is gonna be played after a player is flinged). i’d rather not use lookvector because then it would point in a completely different direction if you use shiftlock or something. anyway, here’s what ive tried.
(for context, objecttoparticle here is a character’s torso.)
for i = 0, 10, 1 do
task.spawn(function()
local newparticol = Instance.new("Part")
newparticol.Size = size
newparticol.CanCollide = false
newparticol.CanQuery = false
newparticol.CanTouch = false
newparticol.Massless = true
newparticol.Anchored = true
newparticol.Color = color
newparticol.Name = "particle"
newparticol.Transparency = .8
newparticol.TopSurface = Enum.SurfaceType.Smooth
newparticol.BottomSurface = Enum.SurfaceType.Smooth
newparticol.Shape = Enum.PartType.Ball
newparticol.CFrame = objecttoparticle.CFrame
newparticol.Parent = workspace
local doingit = true
task.spawn(function()
task.wait(4.2)
doingit = false
end)
while doingit do
-- this next line is the one im struggling with. ive been trying to do it in... quite a lot of different ways. please help me with this. the most important thing here is the lookat(), just ignore all the different stuff
local cframe1 = CFrame.lookAt(objecttoparticle.Position, objecttoparticle.Position + (((objecttoparticle.Position + objecttoparticle.AssemblyLinearVelocity).Unit) - objecttoparticle.Position)) * CFrame.Angles(0, math.rad(i * 36), 0) * CFrame.new(0, 2.5, 5)
local propersnow = {["CFrame"] = cframe1}
tweenserv:Create(newparticol, TweenInfo.new(.05, Enum.EasingStyle.Cubic), propersnow):Play()
task.wait(.05)
end
end)
task.wait(.02)
end
-- also for that one cframe.lookat() line i tried quite a bit of different stuff, like (objecttoparticle.Position + objecttoparticle.Velocity) buut it still didnt work
yeah devforumers i tried checking other posts but i didnt find anything there besides some weird usage of .magnitude which i still dont understand to be honest. also if you didnt really understand what i meant by “making the particle look like it points to the direction the player is going” i just want it to be like theres a ring that looks perpendicular to the direction of the torso (i know i didnt clear up ANY confusion but i hope you get the general idea)
writing this was really hard and im so sorry for the mess you had to read… if you want, i could illustrate the way i want it to look