Hey, i am trying to re-create the Jujutsu Kaisen’s technique: Cursed Technique Reversal: Red.
And, i am trying rn to make that the fx clones to the arm position, but for some reason i always get the error: “attempt to perform arithmetic (sub) on Vector3 and number”.
Here is my code:
local revRedGfx = game:GetService("ReplicatedStorage"):WaitForChild("RevRedCircleFx")
script.Parent.MouseClick:Connect(function(plr)
local anim = Instance.new("Animation")
local id = script.Animation.AnimationId
anim.AnimationId = id
local hum = plr.Character:WaitForChild("Humanoid")
local track = hum.Animator:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Action4
track:Play()
wait(.80)
script.Sound:Play()
wait(11.5)
local revRedNew = revRedGfx:Clone()
local armPos = plr.Character["Right Arm"].Position
revRedNew.Parent = workspace
revRedNew.Position = Vector3.new(armPos, armPos -.9, armPos + .6)
end)
You’re applying a Vector3 value within one of its axes instead of a number, get the data from their specific axis. (eg: Position.X, Position.Y, and Position.Z)
I’d also advise to use task.wait() instead of wait() since it’s deprecated and to connect to a named function instead of using a lambda (anonymous) function since it could use more memory overtime.