Code used for movement:

local soulspeed = 25/60 -- the soul moves 25 studs every second, assuming the game is on 60fps
game:GetService("RunService").Stepped:connect(function()
local uip = game:GetService("UserInputService")
local soul = screen.Heart
local wkey = uip:IsKeyDown(Enum.KeyCode.W)
local akey = uip:IsKeyDown(Enum.KeyCode.A)
local skey = uip:IsKeyDown(Enum.KeyCode.S)
local dkey = uip:IsKeyDown(Enum.KeyCode.D)
if wkey then
soul.Position = soul.Position + Vector3.new(0,soulspeed,0)
end
if akey then
soul.Position = soul.Position - Vector3.new(soulspeed,0 ,0)
end
if skey then
soul.Position = soul.Position - Vector3.new(0,soulspeed,0)
end
if dkey then
soul.Position = soul.Position + Vector3.new(soulspeed,0 ,0)
end
end)

I've tried Stepped, RenderStepped, and Heartbeat and the soul part still seems to move outside the box. I've even tried setting up touched functions for each battle box part to lightly push the soul back inside, but it wasn't working at all. All parts (the battle box parts and the soul) are collidable and anchored. How can I get the soul part to stay inside the battle box?