I made this test weld script, and it works great, exactly how I wanted it to be. The problem is that the CFrame of the magic circle is literally on the character, and I want it to be where I said the circle's CFrame is in the script. I tried just circle.CFrame:inverse() but that doesnt work. I cant think of anything else. Can anyone help me?
Yes, I know KeyDown is deprecated. I just used it as a quick test for this.
local plr = game.Players.LocalPlayer
local char = game.Workspace:WaitForChild(plr.Name)
local tool = script.Parent
local CAS = game:GetService("ContextActionService")
local Mouse = plr:GetMouse()
local RootPart = char.HumanoidRootPart
local ButtonDown = true
local debounce = false
local animation = script.Animation
local hum = char.Humanoid
local animTrack = hum:LoadAnimation(animation)
function weld()
if not debounce then
debounce = true
ButtonDown = true
circle = game.ReplicatedStorage.circle:Clone()
circle.Size = Vector3.new(10,10,0)
circle.Parent = game.Workspace.fireball
circle.Anchored = false
circle.CanCollide = false
circle.Transparency = 0
circle.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(10,0,0)
local Weld = Instance.new("Weld")
Weld.Parent = circle
Weld.Part0 = circle
Weld.Part1 = char.HumanoidRootPart
Weld.C0 = circle.CFrame:inverse()*RootPart.CFrame
bp = Instance.new("BodyPosition")
bp.Parent = char.Torso
bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bp.Position = char.Torso.Position
bg = Instance.new("BodyGyro")
bg.D = 100
bg.Parent = char.Torso
bg.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
char.Torso.CFrame = CFrame.new(char.Torso.Position, Mouse.Hit.p)
while ButtonDown == true do
bg.cframe = CFrame.new(char.Torso.Position, Mouse.Hit.p)
animTrack:Play()
wait()
end
wait(2)
debounce = false
end
end
Mouse.KeyDown:Connect(function(key)
key = key:lower()
if key == "u" then
weld()
end
end)
Mouse.KeyUp:Connect(function(key)
key = key:lower()
if key == "u" then
ButtonDown = false
animTrack:Stop()
circle:Destroy()
bg:Destroy()
bp:Destroy()
end
end)

2 comments
Well it's on your character because you're using inverse. Could you explain more clearly what you're trying to achieve?
Basically, the magic circle is a part that has a magic circle decal on it, front and back. I want it so whenever the player moves their mouse, the character's torso follows, and I want to weld the magic circle to the torso to follow. However, the animation I'm playing is just the characters arm sticking out, and I want the magic circle to be in front of that