I got this free flying script from somewhere (I forgot where from) and I’m HEAVILY modifying it, but I can’t seem to figure out how to move my wind burst effect from the ReplicatedStorage to the specific limb/part I want to move it to, let alone the HumanoidRootPart. Everything actually works, except for the animation which is a whole other issue involving animation weight, but I can’t figure out how to move the effect to the desired spot.
Video:
Portion of script where I’m trying to implement:
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local humanoidRootPart = player.Character.PrimaryPart
--3rd Person Effects
local windBurst = game.ReplicatedStorage["Wind Burst Facing"]
if windBurst.ParticleEmitter.Enabled == true then
windBurst.Parent = humanoidRootPart
end
windBurst.ParticleEmitter.Enabled = false
game:GetService("RunService").RenderStepped:Connect(function()
if script.Parent == Character then
if Flying == true then
Humanoid:ChangeState(6)
v3.CFrame = game.Workspace.Camera.CFrame
if u2() == Vector3.new(0, 0, 0) then
Flymoving.Value = false
else
Flymoving.Value = true
end
TweenService:Create(BodyVelocity, TweenInfo.new(0.3), {Velocity = u2() * 350}):Play()
end
end
end)
Flymoving.Changed:Connect(function(p1)
if p1 == true then
TweenService:Create(Camera, TweenInfo.new(0.5), {FieldOfView = 100}):Play()
v10:Stop()
Sound2:Play()
windBurst.ParticleEmitter:Emit(1)
Sound1:Play()
v11:Play()
return
end
if p1 == false then
TweenService:Create(Camera, TweenInfo.new(0.5), {FieldOfView = 70}):Play()
v11:Stop()
Sound2:Play()
Sound1:Stop()
v10:Play()
end
end)
Its all good, learning takes time-- just experiment with it and you’ll get something desirable, I think what you should do is place the windBurst using :PivotTo() or just windBurst.Position = HumanoidRootPart.Position, right before you actually call the :Emit()
It still doesn’t want to work, this is the new code:
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local humanoidRootPart = player.Character.PrimaryPart
--3rd Person Effects
local windBurst = game.ReplicatedStorage["Wind Burst Facing"]
windBurst.ParticleEmitter.Enabled = false
game:GetService("RunService").RenderStepped:Connect(function()
if script.Parent == Character then
if Flying == true then
Humanoid:ChangeState(6)
v3.CFrame = game.Workspace.Camera.CFrame
if u2() == Vector3.new(0, 0, 0) then
Flymoving.Value = false
else
Flymoving.Value = true
end
TweenService:Create(BodyVelocity, TweenInfo.new(0.3), {Velocity = u2() * 350}):Play()
end
end
end)
Flymoving.Changed:Connect(function(p1)
if p1 == true then
TweenService:Create(Camera, TweenInfo.new(0.5), {FieldOfView = 100}):Play()
v10:Stop()
Sound2:Play()
windBurst.ParticleEmitter:Emit(1)
windBurst.Parent = humanoidRootPart
Sound1:Play()
v11:Play()
return
end
if p1 == false then
TweenService:Create(Camera, TweenInfo.new(0.5), {FieldOfView = 70}):Play()
v11:Stop()
Sound2:Play()
Sound1:Stop()
v10:Play()
end
end)