I’m following up to a post I made yesterday questioning how to create VFX and this tackles a different issue in the process so sorry if this is considered a duplicate post!
To recap, this is an animation that I worked on in Moon Animator and I am currently transferring the effects over into the actual product:
The process of making the VFX function in the in game animation itself has been a bit of a process but I am almost done with it! Just a small thing that I cannot seem to figure out currently.
I have figured out how to tween a model using a combination of the primary part and the pivot point to animate it, but the model is going off in a seemingly consistent direction. It is shown in the video here: (Rocks are flying up in the sky to demonstrate the problem clearly.)
For the rocks, I want them to go straight upwards instead of veering off in a random direction. My leading theory is that the rocks are attempting to return to the point at which they are called from replicated storage, but looking back at the picture compared to the footage it seems like a completely different direction. Image below:
I’m sure this is a small fix and that it’s just something I’m not able to wrap my head around just yet. I will leave the code that conducts the animation to play: (Everything commented out is unrelated to the problem.
buster:GetMarkerReachedSignal("Effects"):Connect(function()
print("Effects marker reached")
--local shockwaveEffect = shockwave:Clone()
local rocksEffect = rocks:Clone()
local primaryRock = rocksEffect.PrimaryPart --Gets the Rock Spawn part in rocks:Clone()
local rocksCFrame = primaryRock.CFrame --Gets the CFrame of the primary part for animating
local explosionEffect = explosion:Clone()
--[[shockwaveEffect.Position = humanPlayer.Position + Vector3.new(0, -2.5, 0) --Cloning for parts
shockwaveEffect.Parent = workspace]]
rocksEffect:PivotTo(characterDirection + Vector3.new(0, -4, 0)) --Cloning for models
rocksEffect.Parent = workspace
--[[explosionEffect.Position = humanPlayer.Position --Cloning for parts
explosionEffect.Parent = workspace
local shockwaveInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
local shockwaveProperties = {
["Size"] = Vector3.new(0.169, 20, 20),
["Transparency"] = 1
}
local shockwaveTween = tweenService:Create(shockwaveEffect, shockwaveInfo, shockwaveProperties)]]
local rockInfo = TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
local rockProperties = {
["CFrame"] = rocksCFrame + Vector3.new(0, 50, 0), --Tween the primary part
}
local rockTween = tweenService:Create(primaryRock, rockInfo, rockProperties)
--shockwaveTween:Play()
rockTween:Play()
wait(2)
--shockwaveEffect:Destroy()
rocksEffect:Destroy()
--explosionEffect:Destroy()
Again, sorry if this is considered a duplicate post!