You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to make a slash VFX that properly orientates around the user. -
What is the issue? Include enough details if possible!
The slash VFX orientation is not working as it should. -
What solutions have you thought of so far?
I’ve tried getting the position and orientation of both the user and the VFX and they still turn out the same.
Here’s the VFX:
Here’s the script that fires for client for VFX (User is the c)
elseif effect == "BasicSlash" then
local zanSlash = RS.VFX.ZanSlash:Clone()
zanSlash.Parent = user
zanSlash.CFrame = user.HumanoidRootPart.CFrame * CFrame.new(0, 0, -0.2)
local weld = Instance.new("WeldConstraint")
weld.Part0 = zanSlash
weld.Part1 = user.HumanoidRootPart
weld.Parent = zanSlash
print("P Pos: "..tostring(user.HumanoidRootPart.Position).." P Orien:"..tostring(user.HumanoidRootPart.Orientation))
print("Z Pos: "..tostring(zanSlash.Position).." Z Orien:"..tostring(zanSlash.Orientation))
wait(0.0001)
zanSlash.A1.Slash:Emit(1)
zanSlash.A1.Slash1:Emit(1)
zanSlash.A2.BlackShard:Emit(1)
zanSlash.A2.BlackShards1:Emit(5)
zanSlash.A2.Shard:Emit(1)
zanSlash.A2.Shards:Emit(5)
zanSlash.A2.Shards1:Emit(5)
zanSlash.A2.Specs:Emit(5)
Debris:AddItem(zanSlash, 2)
elseif effect == "BasicSlash2" then
local zanSlash = RS.VFX.ZanSlash:Clone()
zanSlash.Parent = user
zanSlash.CFrame = user.HumanoidRootPart.CFrame * CFrame.new(0, 0, -0.2)
local weld = Instance.new("WeldConstraint")
weld.Part0 = zanSlash
weld.Part1 = user.HumanoidRootPart
weld.Parent = zanSlash
zanSlash.A1.Slash.ShapeInOut = Enum.ParticleEmitterShapeInOut.Outward
zanSlash.A1.Slash1.ShapeInOut = Enum.ParticleEmitterShapeInOut.Outward
print("P Pos: "..tostring(user.HumanoidRootPart.Position).." P Orien:"..tostring(user.HumanoidRootPart.Orientation))
print("Z Pos: "..tostring(zanSlash.Position).." Z Orien:"..tostring(zanSlash.Orientation))
wait(0.0001)
zanSlash.A1.Slash:Emit(1)
zanSlash.A1.Slash1:Emit(1)
zanSlash.A2.BlackShard:Emit(1)
zanSlash.A2.BlackShards1:Emit(5)
zanSlash.A2.Shard:Emit(1)
zanSlash.A2.Shards:Emit(5)
zanSlash.A2.Shards1:Emit(5)
zanSlash.A2.Specs:Emit(5)
Debris:AddItem(zanSlash, 2)
Here’s the script that fires the client
if combo == 1 or combo == 3 or combo == 5 then
effectEvent:FireAllClients("BasicSlash", nil, char, nil)
elseif combo == 2 or combo == 4 then
effectEvent:FireAllClients("BasicSlash2", nil, char, nil)
end
Here’s the sword VFX in the RS